-
Notifications
You must be signed in to change notification settings - Fork 36
/
native-constant-source-node.ts
28 lines (20 loc) · 1.12 KB
/
native-constant-source-node.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { INativeConstantSourceNodeMap } from './native-constant-source-node-map';
// @todo Since there are no native types yet they need to be crafted.
export interface INativeConstantSourceNode extends AudioNode {
readonly offset: AudioParam;
onended: ((this: INativeConstantSourceNode, event: Event) => any) | null;
addEventListener <K extends keyof INativeConstantSourceNodeMap> (
type: K,
listener: (this: OscillatorNode, ev: INativeConstantSourceNodeMap[K]) => any,
options?: boolean | AddEventListenerOptions
): void;
addEventListener (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener <K extends keyof INativeConstantSourceNodeMap> (
type: K,
listener: (this: OscillatorNode, ev: INativeConstantSourceNodeMap[K]) => any,
options?: boolean | EventListenerOptions
): void;
removeEventListener (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
start (when?: number): void;
stop (when?: number): void;
}