Skip to content

Typescript typings #12

@mikaello

Description

@mikaello

Here is TypeScript typings if someone is using this module in a TypeScript environment:

export = createAudioMeter;

declare type ScriptProcessorNodeMod = ScriptProcessorNode & {
  clipping = boolean;
  lastClip = number;
  volume = number;
  clipLevel = number;
  averaging = number;
  clipLag = number;

  checkClipping: () => boolean;
  shutdown: () => void;
};

declare function createAudioMeter(
  audioContext: AudioContext,
  clipLevel: number,
  averaging: number,
  clipLag: number,
): ScriptProcessorNodeMod;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions