From b19bb96faef43589a128b618d7bbfe193a592b5d Mon Sep 17 00:00:00 2001 From: SuneLindhard Date: Thu, 12 Jan 2017 18:39:59 +0100 Subject: [PATCH] BigScreen - Update index.d.ts (#13723) * Update index.d.ts When porting a project to .ts I found some inconsistencies with this type definition and the library. In "the how to use it examples" they use .toggle() without any parameters and BigScreen not bigscreen * Update Index.d.ts - Suggestion from andy-ms --- bigscreen/index.d.ts | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/bigscreen/index.d.ts b/bigscreen/index.d.ts index 85cabd4d16..6d240729c5 100644 --- a/bigscreen/index.d.ts +++ b/bigscreen/index.d.ts @@ -3,24 +3,16 @@ // Definitions by: Douglas Eichelberger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface BigScreenStatic { - // Properties - element: Element; - enabled: boolean; +export as namespace BigScreen; - // Methods - exit(): void; - onchange(element: Element): void; - onenter(element: Element): void; - onerror(element: Element, reason: string): void; - onexit(): void; - request(element: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void; - toggle(element: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void; - videoEnabled(video: HTMLVideoElement): boolean; -} +export const element: Element; +export const enabled: boolean; -declare var bigscreen: BigScreenStatic; - -declare module "bigscreen" { - export = bigscreen; -} +export function exit(): void; +export function onchange(element: Element): void; +export function onenter(element: Element): void; +export function onerror(element: Element, reason: string): void; +export function onexit(): void; +export function request(element: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void; +export function toggle(element?: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void; +export function videoEnabled(video: HTMLVideoElement): boolean;