66 * Copyright 2015, Yahoo! Inc.
77 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
88 */
9- import type * as React from 'react'
9+ import type {
10+ ComponentType ,
11+ ForwardRefExoticComponent ,
12+ MemoExoticComponent ,
13+ } from 'react'
1014import { ForwardRef , Memo , isMemo } from '../utils/react-is'
1115
1216const REACT_STATICS = {
@@ -66,16 +70,16 @@ function getStatics(component: any) {
6670}
6771
6872export type NonReactStatics <
69- S extends React . ComponentType < any > ,
73+ S extends ComponentType < any > ,
7074 C extends {
7175 [ key : string ] : true
7276 } = { } ,
7377> = {
7478 [ key in Exclude <
7579 keyof S ,
76- S extends React . MemoExoticComponent < any >
80+ S extends MemoExoticComponent < any >
7781 ? keyof typeof MEMO_STATICS | keyof C
78- : S extends React . ForwardRefExoticComponent < any >
82+ : S extends ForwardRefExoticComponent < any >
7983 ? keyof typeof FORWARD_REF_STATICS | keyof C
8084 : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C
8185 > ] : S [ key ]
@@ -89,8 +93,8 @@ const getPrototypeOf = Object.getPrototypeOf
8993const objectPrototype = Object . prototype
9094
9195export default function hoistNonReactStatics <
92- T extends React . ComponentType < any > ,
93- S extends React . ComponentType < any > ,
96+ T extends ComponentType < any > ,
97+ S extends ComponentType < any > ,
9498 C extends {
9599 [ key : string ] : true
96100 } = { } ,
0 commit comments