- Notifications
You must be signed in to change notification settings - Fork79
mention strictFunctionTypes#43
New issue
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hey@Ebuall. Thanks for this, could you make the wording a bit clearer?
@@ -782,6 +782,7 @@ function getLength(o: {+p: ?string}): number { | |||
[TypeScript proposal](https://github.com/Microsoft/TypeScript/issues/10717) | |||
Bivariance is among [the design decisions](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-function-parameters-bivariant) driving TypeScript. | |||
Can be turned off for standalone functions with flag `--strictFunctionTypes` since [Typescript 2.6](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure it's clear what a "standalone" function is. Perhaps it's better to call this "for functions that are not methods". Also, this specifically makes the type checking of functionscontravariant
.
Feature from here#20 landed.