Skip to content

Commit

Permalink
Fix minor TypeDoc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
frostburn committed May 12, 2024
1 parent 6246dec commit f15eb22
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/diamond-mos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
VULGAR_FRACTIONS,
VulgarFraction,
} from './pythagorean';
import {ZERO, hasOwn} from './utils';
import {ZERO} from './utils';

export type MosDegree = {
center: TimeMonzo;
Expand Down
5 changes: 4 additions & 1 deletion src/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ export type SquareSuperparticular = {
end: bigint | null;
};

/**
* AST node produced by the parser or a synthetic one used for formatting.
*/
export type IntervalLiteral =
| IntegerLiteral
| DecimalLiteral
Expand Down Expand Up @@ -1132,7 +1135,7 @@ export function integerToVectorComponent(num: number): VectorComponent {
};
}

export function literalToJSON(literal?: IntervalLiteral) {
export function literalToJSON(literal?: IntervalLiteral): any {
if (!literal) {
return undefined;
}
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export {
type Nominal,
type AbsolutePitch,
} from './pythagorean';
export * from './diamond-mos';
export * from './tools';
export {
MetricPrefix,
Expand Down
6 changes: 3 additions & 3 deletions src/interval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ export class Interval {

/**
* Serialize the time monzo to a JSON compatible object.
* @returns The serialized object with property `type` set to `'TimeMonzo'`.
* @returns The serialized object with property `type` set to `'Interval'`.
*/
toJSON() {
toJSON(): any {
return {
type: 'Interval',
value: this.value.toJSON(),
Expand Down Expand Up @@ -1001,7 +1001,7 @@ export class Interval {
* @param context Current root context with information about root pitch and size of ups and lifts.
* @returns A true AST node suitable for string conversion or `undefined` realization is impossible in the given context.
*/
realizeNode(context: RootContext) {
realizeNode(context: RootContext): IntervalLiteral | undefined {
if (!this.node) {
return this.node;
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser/statement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ export class StatementVisitor {

/**
* Execute the abstract syntax tree of a SonicWeave program.
* @param body Program containing the AST to be executed.
* @param program Program containing the AST to be executed.
*/
executeProgram(program: Program) {
const interrupt = this.executeStatements(program.body);
Expand Down

0 comments on commit f15eb22

Please sign in to comment.