Skip to content

Commit

Permalink
lint and typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sethbrasile committed Sep 24, 2024
1 parent 40cd65b commit 13928fd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 72 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,5 @@
"vite-plugin-prismjs": "^0.0.11",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5"
},
"dependencies": {
"array-buffer-cache": "^4.0.99"
}
}
62 changes: 0 additions & 62 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/base-sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Connectable, Connection } from '@interfaces/connectable'
import type { ControlType, ParamController, RampType, RatioType } from '@controllers/base-param-controller'
import audioContextAwareTimeout from '@utils/timeout'

interface BaseSoundOptions {
export interface BaseSoundOptions {
name?: string
setTimeout?: (fn: () => void, delayMillis: number) => number
}
Expand Down
2 changes: 1 addition & 1 deletion src/beat-track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class BeatTrack extends Sampler {

/**
* @property wrapWith
* @see BeatTrackOptions wrapWith for more info
* see BeatTrackOptions wrapWith for more info
*/
private wrapWith?: (beat: Beat) => Beat

Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ export async function createWhiteNoise(): Promise<Sound> {
*
* @param {object} props POJO to pass to the new instance
*/
function createSoundFor(type: 'sound' | 'track' | 'sampler', buffer: any): Sound | Sampler | Track {
function createSoundFor(type: 'sound' | 'track' | 'sampler', props: any): Sound | Sampler | Track {
switch (type) {
case 'track':
return new Track(audioContext, buffer)
return new Track(audioContext, props)
case 'sampler':
return new Sampler(buffer)
return new Sampler(props)
default:
return new Sound(audioContext, buffer)
return new Sound(audioContext, props)
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/oscillator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import type { TimeObject } from '@utils/create-time-object'
import createTimeObject from '@utils/create-time-object'
import type { ControlType, RampType } from '@controllers/base-param-controller'
import { OscillatorController } from './controllers/oscillator-controller'
import type { BaseSoundOptions } from './base-sound'
import { BaseSound } from './base-sound'

export interface OscillatorOptsFilterValues {
frequency?: number
q?: number
}

export interface OscillatorOpts {
export interface OscillatorOpts extends BaseSoundOptions {
startOffset?: number
frequency?: number
detune?: number
Expand Down

0 comments on commit 13928fd

Please sign in to comment.