Skip to content

Commit

Permalink
fix(): update ComponentInterface definition
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jun 27, 2019
1 parent a2a8033 commit e5bae1b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 262 deletions.
241 changes: 0 additions & 241 deletions src/compiler/app-core/reserved-properties.ts

This file was deleted.

21 changes: 4 additions & 17 deletions src/declarations/component-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ export interface ComponentDidUnload {
componentDidUnload: () => void;
}

export interface ComponentInstance {
export interface ComponentInterface {
connectedCallback?: () => void;
disconnectedCallback?: () => void;

componentWillRender?: () => Promise<void> | void;
componentDidRender?: () => void;

/**
* The component is about to load and it has not
* rendered yet.
Expand Down Expand Up @@ -107,24 +110,8 @@ export interface ComponentInstance {
*/
componentDidUpdate?: () => void;

/**
* The component did unload and the element
* will be destroyed.
*/
componentDidUnload?: () => void;

render?: () => any;

/**
* Used to dynamically set host element attributes.
* Should be placed directly above render()
*/
hostData?: () => {
class?: {[className: string]: boolean};
style?: any;
[attrName: string]: any;
};

[memberName: string]: any;
}

Expand Down
2 changes: 1 addition & 1 deletion src/declarations/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface HostRef {
$flags$: number;
$hostElement$?: d.HostElement;
$instanceValues$?: Map<string, any>;
$lazyInstance$?: d.ComponentInstance;
$lazyInstance$?: d.ComponentInterface;
$onReadyPromise$?: Promise<any>;
$onReadyResolve$?: (elm: any) => void;
$vnode$?: d.VNode;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export {
ComponentDidUpdate,
ComponentWillLoad,
ComponentWillUpdate,
ComponentInstance as ComponentInterface,
ComponentInterface,
StencilConfig as Config,
EventEmitter,
FunctionalComponent,
Expand Down
4 changes: 2 additions & 2 deletions src/testing/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export {
ComponentDidUpdate,
ComponentWillLoad,
ComponentWillUpdate,
ComponentInstance as ComponentInterface,
ComponentInterface,
StencilConfig as Config,
EventEmitter,
FunctionalComponent,
QueueApi,
JSXBase,
JSX
} from '../declarations';

/**
Expand Down

0 comments on commit e5bae1b

Please sign in to comment.