Skip to content

Conversation

lucacasonato
Copy link
Member

This commit updates fast check to perform syntax based type inference on
variable initalizers and function return values. The inferred types are
then used as variable declaration type annotations, or function return
type annotations respectively.

This is a first step in removing leavable types in favor of an aligned
.d.ts and .ts emit.

This commit also adds a slew of new diagnostic information to help users
understand why a type was unable to be inferred. It gives more helpful
messages than the previous "add an explicit type" messages.

TODO:

  • more tests
  • finalize the error for referring to local variables

This includes type params, function params, and params declared through `infer X` in type annotations.
This commit updates fast check to perform syntax based type inference on
variable initalizers and function return values. The inferred types are
then used as variable declaration type annotations, or function return
type annotations respectively.

This is a first step in removing leavable types in favor of an aligned
`.d.ts` and `.ts` emit.

This commit also adds a slew of new diagnostic information to help users
understand why a type was unable to be inferred. It gives more helpful
messages than the previous "add an explicit type" messages.

TODO:
- more tests
- finalize the error for referring to local variables
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.

1 participant