angular-cn/tools/public_api_guard/elements/elements.d.ts

31 lines
1.0 KiB
TypeScript
Raw Normal View History

2017-10-12 05:36:34 -04:00
/** @experimental */
export interface NgElement<T> extends HTMLElement {
componentRef: ComponentRef<T> | null;
ngElement: NgElement<T> | null;
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void;
connectedCallback(): void;
detach(): void;
detectChanges(): void;
disconnectedCallback(): void;
getHost(): HTMLElement;
markDirty(): void;
}
/** @experimental */
export interface NgElementConstructor<T, P> {
readonly is: string;
readonly observedAttributes: string[];
new (): NgElementWithProps<T, P>;
upgrade(host: HTMLElement): NgElementWithProps<T, P>;
}
2017-10-12 05:36:34 -04:00
/** @experimental */
export declare type NgElementWithProps<T, P> = NgElement<T> & {
[property in keyof
/** @experimental */
export declare function registerAsCustomElements<T>(customElementComponents: Type<any>[], platformRef: PlatformRef, moduleFactory: NgModuleFactory<T>): Promise<NgModuleRef<T>>;
/** @experimental */
export declare const VERSION: Version;