Skip to content

Add support for typing of functions with variable/optional arguments in Source Typed #1398

Open
@zhaojj2209

Description

@zhaojj2209

Currently, the Source Typed type error checker is unable to handle typing of the following cases:

  • Pre-declared functions with variable/optional arguments (e.g. display, math_max)
  • Spread syntax (e.g. functions with variable number of arguments, spreading of arrays)

The relevant code in typeErrorChecker.ts have been marked with TODOs.

Implementation should be made easier once the type inference feature is removed, as the types used by the type error checker would no longer be constrained by the type system used in the type inference feature, and can be expanded more easily to include variable/optional function types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestProposalProposing a feature, please discuss

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions