@@ -5,7 +5,15 @@ import { AppContainer } from "../reconciler";
55type UpdatePayload = any ;
66
77export interface RNProps { }
8- export abstract class RNWidget extends NodeWidget {
8+ export abstract class RNWidget extends NodeWidget implements RNComponent {
9+ static tagName : string ;
10+ abstract setProps ( newProps : RNProps , oldProps : RNProps ) : void ;
11+ abstract appendInitialChild ( child : NodeWidget ) : void ;
12+ abstract appendChild ( child : NodeWidget ) : void ;
13+ abstract insertBefore ( child : NodeWidget , beforeChild : NodeWidget ) : void ;
14+ abstract removeChild ( child : NodeWidget ) : void ;
15+ }
16+ export abstract class RNComponent {
917 static tagName : string ;
1018 abstract setProps ( newProps : RNProps , oldProps : RNProps ) : void ;
1119 abstract appendInitialChild ( child : NodeWidget ) : void ;
@@ -24,25 +32,25 @@ export abstract class ComponentConfig {
2432 rootInstance : AppContainer ,
2533 context : any ,
2634 workInProgress : Fiber
27- ) : NodeWidget ;
35+ ) : RNComponent ;
2836 finalizeInitialChildren (
29- instance : NodeWidget ,
37+ instance : RNComponent ,
3038 newProps : RNProps ,
3139 rootContainerInstance : AppContainer ,
3240 context : any
3341 ) {
3442 return false ;
3543 }
3644 commitMount (
37- instance : NodeWidget ,
45+ instance : RNComponent ,
3846 newProps : RNProps ,
3947 internalInstanceHandle : any
4048 ) {
4149 return ;
4250 }
4351 // Update methods:
4452 prepareUpdate (
45- instance : NodeWidget ,
53+ instance : RNComponent ,
4654 oldProps : RNProps ,
4755 newProps : RNProps ,
4856 rootContainerInstance : AppContainer ,
@@ -51,7 +59,7 @@ export abstract class ComponentConfig {
5159 return true ;
5260 }
5361 abstract commitUpdate (
54- instance : NodeWidget ,
62+ instance : RNComponent ,
5563 updatePayload : any ,
5664 oldProps : RNProps ,
5765 newProps : RNProps ,
0 commit comments