mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
// Type definitions for webcomponents.js 0.6.0
|
|
// Project: https://github.com/webcomponents/webcomponentsjs
|
|
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
declare module webcomponents {
|
|
|
|
export interface CustomElementInit {
|
|
prototype: HTMLElement;
|
|
extends?: string;
|
|
}
|
|
|
|
export interface CustomElementsPolyfill {
|
|
hasNative: boolean;
|
|
flags: any;
|
|
ready: boolean;
|
|
useNative: boolean;
|
|
}
|
|
|
|
export interface HTMLImportsPolyfill {
|
|
IMPORT_LINK_TYPE: string;
|
|
isIE: boolean;
|
|
flags: any;
|
|
ready: boolean;
|
|
rootDocument: Document;
|
|
useNative: boolean;
|
|
whenReady(callback: () => void): void;
|
|
}
|
|
|
|
export interface Polyfill {
|
|
flags: any;
|
|
}
|
|
|
|
}
|
|
|
|
declare module "webcomponents.js" {
|
|
export = webcomponents;
|
|
}
|
|
|
|
interface Document {
|
|
registerElement(name: string, prototype: webcomponents.CustomElementInit): void;
|
|
}
|
|
|
|
interface Window {
|
|
CustomElements: webcomponents.CustomElementsPolyfill;
|
|
HTMLImports: webcomponents.HTMLImportsPolyfill;
|
|
WebComponents: webcomponents.Polyfill;
|
|
}
|