Skip to content

Out of Band Type Annotation Support for Signatures #11218

Closed
@iclanzan

Description

@iclanzan

I am not sure if it would be at all possible or feasible but I would really appreciate Hindley–Milner type signature support in TypeScript:

// stringLength :: String -> Number
const stringLength = word => word.length

I am writing a lot of code like this as I find it much easier to read but unfortunately TypeScript doesn’t understand this notation.

Some relevant reading:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Out of ScopeThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions