8000 Need support for type alias checking... · Issue #6461 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Need support for type alias checking... #6461
@qdwang

Description

@qdwang
type price = number;
type size = number;

var a: price = 1;
var b: price = 1;

var c: size = 1;
var d: size = 1;

console.log(a + b); // this should work;
console.log(a + c); // this should fail;

Or is there an alternative way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0