1212
1313'use strict' ;
1414
15- import type {
16- ReactNativeBaseComponentViewConfig ,
17- ViewConfigGetter ,
18- } from './ReactNativeTypes' ;
19-
20- const invariant = require ( 'invariant' ) ;
15+ import { type ViewConfig } from './ReactNativeTypes' ;
16+ import invariant from 'invariant' ;
2117
2218// Event configs
2319const customBubblingEventTypes : {
@@ -42,9 +38,7 @@ exports.customDirectEventTypes = customDirectEventTypes;
4238const viewConfigCallbacks = new Map ( ) ;
4339const viewConfigs = new Map ( ) ;
4440
45- function processEventTypes (
46- viewConfig : ReactNativeBaseComponentViewConfig < > ,
47- ) : void {
41+ function processEventTypes ( viewConfig : ViewConfig ) : void {
4842 const { bubblingEventTypes, directEventTypes} = viewConfig ;
4943
5044 if ( __DEV__ ) {
@@ -82,7 +76,7 @@ function processEventTypes(
8276 * A callback is provided to load the view config from UIManager.
8377 * The callback is deferred until the view is actually rendered.
8478 */
85- exports . register = function ( name : string , callback : ViewConfigGetter ) : string {
79+ exports . register = function ( name : string , callback : ( ) = > ViewConfig ) : string {
8680 invariant (
8781 ! viewConfigCallbacks . has ( name ) ,
8882 'Tried to register two views with the same name %s' ,
@@ -103,7 +97,7 @@ exports.register = function(name: string, callback: ViewConfigGetter): string {
10397 * If this is the first time the view has been used,
10498 * This configuration will be lazy-loaded from UIManager.
10599 */
106- exports . get = function ( name : string ) : ReactNativeBaseComponentViewConfig < > {
100+ exports . get = function ( name : string ) : ViewConfig {
107101 let viewConfig ;
108102 if ( ! viewConfigs . has ( name ) ) {
109103 const callback = viewConfigCallbacks . get ( name ) ;
0 commit comments