Skip to content

Commit

Permalink
fix(ts-typings): make LC hooks on Copoment required - cause they are …
Browse files Browse the repository at this point in the history
…always on Base class

- also add missing `is`
  • Loading branch information
Hotell committed Feb 19, 2017
1 parent 098ea51 commit ea66938
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ts-typings/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ export class Component<Props> extends HTMLElement {
// this is not possible yet? ... without this we have to duplicate props definition with class props definition
// [K in keyof Props]: Props[K],

static readonly is: string;
static readonly props: ComponentProps<any, any>;
static readonly observedAttributes: string[];

// Custom Elements v1
connectedCallback(): void;
disconnectedCallback(): void;
attributeChangedCallback(name: string, oldValue: null | string, newValue: null | string): void;
adoptedCallback?(): void;
adoptedCallback(): void;

// SkateJS life cycle
updatedCallback(previousProps: { [nameOrSymbol: string]: any }): boolean | void;
// NOTE: infering generics work only on instances, not on implementation type. So this will not give you type safety, you still have to manually annotate those props in your code
renderCallback(props?:Props): VDOMElement<any> | VDOMElement<any>[] | null;
renderCallback(props?: Props): VDOMElement<any> | VDOMElement<any>[] | null;
renderedCallback(): void;

// SkateJS DEPRECATED
Expand Down

0 comments on commit ea66938

Please sign in to comment.