Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exactOptionalPropertyTypes, Required
Playground link with relevant code
declare const someVal: Required<{ fn?(key: string): string | null; }>; someVal.fn(""); // Cannot invoke an object which is possibly 'undefined'.(2722)
TS shows the an error for the function call: Cannot invoke an object which is possibly 'undefined'.(2722)
I expect no error because the type definition already makes clear that all functions in that type are required, none optional.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
exactOptionalPropertyTypes, Required
Playground link with relevant code
TS shows the an error for the function call: Cannot invoke an object which is possibly 'undefined'.(2722)
I expect no error because the type definition already makes clear that all functions in that type are required, none optional.
The text was updated successfully, but these errors were encountered: