- Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
TypeScript Version: 3.4.1
Search Terms:
Code
interface Component<P> { (props: P): unknown; // Comment this out and it works defaultProps?: Partial<P>; } declare function myHoc<Props>(C: Component<Props>): Component<Props>; type Props<T> = { t: T; foo: number }; declare function MyComponent<T>(props: Props<T>): unknown; // Expected type: <T>(props: Props<T>) => unknown // Actual type: Component<Props<{}>> const MyComponent2 = myHoc(MyComponent); // Workaround: assert the resulting type const MyComponent3 = myHoc(MyComponent) as typeof MyComponent;
jgornick, edaqa-uncountable, oliviertassinari, bekiomonov and ddimkovikj
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript