Skip to content

Feature: Auto infer types as values #8

@john-bv

Description

@john-bv

Typing a class name as a datatype in then again as a value can be annoying, typesharp should be able to infer these types in one of two ways:

1. Generic Inference

const myImmutable = new Class();

Where myImmutable 's type is inferred as "Class"

2. Syntax Inference

const myImmutable: Class = new ();

Where Class is the type, but new acts on the type, in this case "Class".
It is important to note that the second example would only work with classes or functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions