Skip to content

Commit

Permalink
feat: export NoteType and IntervalType
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb committed Jan 3, 2025
1 parent 86733f4 commit 7da12c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/note/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
note as props,
} from "@tonaljs/pitch-note";

export type { NoteType } from "@tonaljs/pitch-note";

const NAMES = ["C", "D", "E", "F", "G", "A", "B"];

const toName = (n: Note) => n.name;
Expand Down
2 changes: 2 additions & 0 deletions packages/pitch-interval/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface Interval extends Pitch, NamedPitch {
readonly oct: number;
}

export type IntervalType = Interval;

const NoInterval: Interval = Object.freeze({
empty: true,
name: "",
Expand Down
2 changes: 2 additions & 0 deletions packages/pitch-note/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export interface Note extends Pitch, NamedPitch {
readonly freq: number | null;
}

export type NoteType = Note;

const NoNote: Note = Object.freeze({
empty: true,
name: "",
Expand Down
4 changes: 2 additions & 2 deletions packages/tonal/browser/tonal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 7da12c8

Please sign in to comment.