global.d.ts 634 B

1234567891011121314151617181920212223
  1. /* eslint-disable no-var */
  2. /* eslint-disable vars-on-top */
  3. type $TsFixMe = any;
  4. declare var AudioWorkletProcessor: {
  5. prototype: AudioWorkletProcessor;
  6. new (options?: AudioWorkletNodeOptions): AudioWorkletProcessor;
  7. };
  8. interface AudioWorkletProcessor {
  9. readonly port: MessagePort;
  10. process(
  11. inputs: Float32Array[][],
  12. outputs: Float32Array[][],
  13. parameters: Record<string, Float32Array>,
  14. ): boolean;
  15. }
  16. declare function registerProcessor(
  17. name: string,
  18. processorCtor: (new (options?: AudioWorkletNodeOptions) => AudioWorkletProcessor) & {
  19. parameterDescriptors?: AudioParamDescriptor[];
  20. },
  21. ): undefined;