Joey Perrott 15f8afa4bf ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to
goldens/public-api.

Additionally, provides a README in the goldens directory and a script
assist in testing the current state of the repo against the goldens as
well as a command for accepting all changes to the goldens in a single
command.

PR Close #35768
2020-03-10 20:58:39 -04:00

43 lines
1.3 KiB
TypeScript

export declare function createCustomElement<P>(component: Type<any>, config: NgElementConfig): NgElementConstructor<P>;
export declare abstract class NgElement extends HTMLElement {
protected ngElementEventsSubscription: Subscription | null;
protected ngElementStrategy: NgElementStrategy;
abstract attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void;
abstract connectedCallback(): void;
abstract disconnectedCallback(): void;
}
export declare interface NgElementConfig {
injector: Injector;
strategyFactory?: NgElementStrategyFactory;
}
export declare interface NgElementConstructor<P> {
readonly observedAttributes: string[];
new (injector?: Injector): NgElement & WithProperties<P>;
}
export declare interface NgElementStrategy {
events: Observable<NgElementStrategyEvent>;
connect(element: HTMLElement): void;
disconnect(): void;
getInputValue(propName: string): any;
setInputValue(propName: string, value: string): void;
}
export declare interface NgElementStrategyEvent {
name: string;
value: any;
}
export declare interface NgElementStrategyFactory {
create(injector: Injector): NgElementStrategy;
}
export declare const VERSION: Version;
export declare type WithProperties<P> = {
[property in keyof P]: P[property];
};