Skip to content

Commit e5bae1b

Browse files
committed
fix(): update ComponentInterface definition
1 parent a2a8033 commit e5bae1b

File tree

5 files changed

+8
-262
lines changed

5 files changed

+8
-262
lines changed

src/compiler/app-core/reserved-properties.ts

Lines changed: 0 additions & 241 deletions
This file was deleted.

src/declarations/component-interfaces.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ export interface ComponentDidUnload {
6161
componentDidUnload: () => void;
6262
}
6363

64-
export interface ComponentInstance {
64+
export interface ComponentInterface {
6565
connectedCallback?: () => void;
6666
disconnectedCallback?: () => void;
6767

68+
componentWillRender?: () => Promise<void> | void;
69+
componentDidRender?: () => void;
70+
6871
/**
6972
* The component is about to load and it has not
7073
* rendered yet.
@@ -107,24 +110,8 @@ export interface ComponentInstance {
107110
*/
108111
componentDidUpdate?: () => void;
109112

110-
/**
111-
* The component did unload and the element
112-
* will be destroyed.
113-
*/
114-
componentDidUnload?: () => void;
115-
116113
render?: () => any;
117114

118-
/**
119-
* Used to dynamically set host element attributes.
120-
* Should be placed directly above render()
121-
*/
122-
hostData?: () => {
123-
class?: {[className: string]: boolean};
124-
style?: any;
125-
[attrName: string]: any;
126-
};
127-
128115
[memberName: string]: any;
129116
}
130117

src/declarations/runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface HostRef {
8888
$flags$: number;
8989
$hostElement$?: d.HostElement;
9090
$instanceValues$?: Map<string, any>;
91-
$lazyInstance$?: d.ComponentInstance;
91+
$lazyInstance$?: d.ComponentInterface;
9292
$onReadyPromise$?: Promise<any>;
9393
$onReadyResolve$?: (elm: any) => void;
9494
$vnode$?: d.VNode;

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export {
66
ComponentDidUpdate,
77
ComponentWillLoad,
88
ComponentWillUpdate,
9-
ComponentInstance as ComponentInterface,
9+
ComponentInterface,
1010
StencilConfig as Config,
1111
EventEmitter,
1212
FunctionalComponent,

src/testing/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ export {
77
ComponentDidUpdate,
88
ComponentWillLoad,
99
ComponentWillUpdate,
10-
ComponentInstance as ComponentInterface,
10+
ComponentInterface,
1111
StencilConfig as Config,
1212
EventEmitter,
1313
FunctionalComponent,
1414
QueueApi,
15-
JSXBase,
15+
JSX
1616
} from '../declarations';
1717

1818
/**

0 commit comments

Comments
 (0)