假设我有类似的类型React.ComponentClass<Props>,我想引用该Props部分,但它在我当前的上下文中未命名.
React.ComponentClass<Props>
Props
为了显示:
typeof x
在这种情况下,我可以使用,Something但这不会让我直接访问该Something类型.
Something
我想要的是这样的:
GetPropsType<typeof x>
所以我可以提取React.ComponentClass<Props>类型Props
任何相当的东西都会很棒.
typescript
typescript ×1