From f7520ec7bc7e52cce7b2f346a60576723906c166 Mon Sep 17 00:00:00 2001 From: nicholashza Date: Sat, 14 Oct 2017 00:09:36 +0200 Subject: [PATCH] Add Howler 2.0.5 definitions (#20551) Definitions for playerror and xhrWithCredentials introduced in Howler 2.0.5 https://github.com/goldfire/howler.js/blob/master/CHANGELOG.md#205-october-6-2017 --- types/howler/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/howler/index.d.ts b/types/howler/index.d.ts index 2e4f43ae20..0fd16e5f0d 100644 --- a/types/howler/index.d.ts +++ b/types/howler/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for howler.js v2.0.3 +// Type definitions for howler.js v2.0.5 // Project: https://github.com/goldfire/howler.js -// Definitions by: Pedro Casaubon , Todd Dukart , Alexander Leon +// Definitions by: Pedro Casaubon , Todd Dukart , Alexander Leon , Nicholas Higgins // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface HowlerGlobal { @@ -38,9 +38,11 @@ interface IHowlProperties { rate?: number; pool?: number; format?: string[] | string; + xhrWithCredentials?: boolean; onload?: () => void; onloaderror?: (soundId: number, error: any) => void; onplay?: (soundId: number) => void; + onplayerror?: (soundId: number, error: any) => void; onend?: (soundId: number) => void; onpause?: (soundId: number) => void; onstop?: (soundId: number) => void; @@ -78,6 +80,7 @@ interface Howl { on(event: 'load', callback: () => void, id?: number): this; on(event: 'loaderror', callback: (soundId: number, error: any) => void, id?: number): this; on(event: 'play', callback: (soundId: number) => void, id?: number): this; + on(event: 'playerror', callback: (soundId: number, error: any) => void, id?: number): this; on(event: 'end', callback: (soundId: number) => void, id?: number): this; on(event: 'pause', callback: (soundId: number) => void, id?: number): this; on(event: 'stop', callback: (soundId: number) => void, id?: number): this; @@ -91,6 +94,7 @@ interface Howl { once(event: 'load', callback: () => void, id?: number): this; once(event: 'loaderror', callback: (soundId: number, error: any) => void, id?: number): this; once(event: 'play', callback: (soundId: number) => void, id?: number): this; + once(event: 'playerror', callback: (soundId: number, error: any) => void, id?: number): this; once(event: 'end', callback: (soundId: number) => void, id?: number): this; once(event: 'pause', callback: (soundId: number) => void, id?: number): this; once(event: 'stop', callback: (soundId: number) => void, id?: number): this;