Skip to content

Conversation

@Ebuall
Copy link

@Ebuall Ebuall commented Sep 17, 2018

Feature from here #20 landed.

Copy link
Owner

@niieani niieani left a 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?

[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants