@@ -24,6 +24,19 @@ import {
2424 DOCUMENT_FRAGMENT_NODE ,
2525} from '../shared/HTMLNodeType' ;
2626
27+
28+ export type T = string ;
29+ export type P = any ;
30+ export type I = Element ;
31+ export type TI = Text ;
32+ export type HI = any ;
33+ export type PI = Element | Text ;
34+ export type C = Element | Document ;
35+ export type CC = void ;
36+ export type CX = string | { namespace : string , ancestorInfo : mixed } ;
37+ export type PL = Array < mixed > ;
38+
39+
2740export type Container = Element | Document ;
2841type Props = {
2942 autoFocus ?: boolean ,
@@ -111,6 +124,7 @@ export function getRootHostContext(rootContainerInstance: Container): HostContex
111124export function getChildHostContext (
112125 parentHostContext : HostContext ,
113126 type : string ,
127+ instance : *
114128 ) : HostContext {
115129 if ( __DEV__ ) {
116130 const parentHostContextDev = ( ( parentHostContext : any ) : HostContextDev ) ;
@@ -130,13 +144,13 @@ export function getPublicInstance(instance: Instance | TextInstance): * {
130144 return instance ;
131145 }
132146
133- export function prepareForCommit ( ) : void {
147+ export function prepareForCommit ( containerInfo : * ) : void {
134148 eventsEnabled = ReactBrowserEventEmitter . isEnabled ( ) ;
135149 selectionInformation = ReactInputSelection . getSelectionInformation ( ) ;
136150 ReactBrowserEventEmitter . setEnabled ( false ) ;
137151 }
138152
139- export function resetAfterCommit ( ) : void {
153+ export function resetAfterCommit ( containerInfo : * ) : void {
140154 ReactInputSelection . restoreSelection ( selectionInformation ) ;
141155 selectionInformation = null ;
142156 ReactBrowserEventEmitter . setEnabled ( eventsEnabled ) ;
@@ -194,6 +208,7 @@ export function finalizeInitialChildren(
194208 type : string ,
195209 props : Props ,
196210 rootContainerInstance : Container ,
211+ hostContext : * ,
197212 ) : boolean {
198213 setInitialProperties ( domElement , type , props , rootContainerInstance ) ;
199214 return shouldAutoFocusHostComponent ( type , props ) ;
@@ -566,23 +581,45 @@ export function prepareUpdate(
566581 export const cancelDeferredCallback = ReactScheduler . cancelScheduledWork ;
567582
568583
569- export function cloneInstance ( ) {
584+ // TODO
585+
586+ export function cloneInstance (
587+ instance : Instance ,
588+ updatePayload : null | Array < mixed > ,
589+ type : string ,
590+ oldProps : Props ,
591+ newProps : Props ,
592+ internalInstanceHandle : Object ,
593+ keepChildren : boolean ,
594+ recyclableInstance : Instance ,
595+ ) : Instance {
596+ return instance ;
570597 // not supported
571598}
572599
573- export function createContainerChildSet ( ) {
600+ export function createContainerChildSet (
601+ container : Container
602+ ) : void {
574603 // not supported
575604}
576605
577- export function appendChildToContainerChildSet ( ) {
606+ export function appendChildToContainerChildSet (
607+ childSet : void , child : Instance | TextInstance
608+ ) : void {
578609 // not supported
579610}
580611
581- export function finalizeContainerChildren ( ) {
612+ export function finalizeContainerChildren (
613+ container : Container ,
614+ newChildren : void
615+ ) {
582616 // not supported
583617}
584618
585- export function replaceContainerChildren ( ) {
619+ export function replaceContainerChildren (
620+ container : Container ,
621+ newChildren : void
622+ ) {
586623 // not supported
587624}
588625
0 commit comments