Duplicated issue check
package version
4.2.9
Description
spessasynth_lib doesn't re-export several core TypeScript types that are exposed on its public API methods.
Because of this, we can't type the data coming out of or going into spessasynth_lib without either:
- using
@ts-expect-error or any everywhere.
- importing from the transitive dependency
spessasynth_core (which breaks in strict package managers like pnpm).
Expected Behavior
spessasynth_lib should export types which are being used in its public API, eg: BasicMIDI, MIDIData, MIDITrack, MIDIMessage, MIDIController, etc
Reproduction steps
- Initialize a TypeScript project:
pnpm init
pnpm add spessasynth_lib
- Create an index.ts file and attempt to use basic API features:
import { WorkletSynthesizer } from "spessasynth_lib";
declare const ctx: AudioContext;
const synth = new WorkletSynthesizer(ctx);
function changeCC(cc: number) {
// TS Error: expecting MIDIController, but passed number. MIDIController is not exported by `spessasynth_lib`
synth.controllerChange(0, cc, 127);
}
- Run
tsc index.ts or check the lsp. Error is thrown: `index.ts:8:28 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'MIDIController'.
Browser Engine
Chromium (Chrome, Edge, Brave, Opera, etc.)
Additional info
No response
Duplicated issue check
package version
4.2.9
Description
spessasynth_libdoesn't re-export several core TypeScript types that are exposed on its public API methods.Because of this, we can't type the data coming out of or going into
spessasynth_libwithout either:@ts-expect-errororanyeverywhere.spessasynth_core(which breaks in strict package managers like pnpm).Expected Behavior
spessasynth_libshould export types which are being used in its public API, eg:BasicMIDI, MIDIData, MIDITrack, MIDIMessage, MIDIController, etcReproduction steps
tsc index.tsor check the lsp. Error is thrown: `index.ts:8:28 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'MIDIController'.Browser Engine
Chromium (Chrome, Edge, Brave, Opera, etc.)
Additional info
No response