When I try to use this library from TypeScript, I get a type error when passing an AudioContext into the instrument function:
Argument of type 'AudioContext' is not assignable to parameter of type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.
Property 'prototype' is missing in type 'AudioContext' but required in type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'
It seems that the type of ac should just be AudioContext, rather than typeof AudioContext. When I make this change in your index.d.ts, the type error goes away.
When I try to use this library from TypeScript, I get a type error when passing an
AudioContext
into theinstrument
function:It seems that the type of
ac
should just beAudioContext
, rather thantypeof AudioContext
. When I make this change in yourindex.d.ts
, the type error goes away.