Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Owner

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 functions contravariant.


## Useful References

Expand Down