Skip to content

通过接口 A<T>,为什么 A<string> 可赋值给 A<number>? 这个解析貌似错误的。 #255

@aatoe

Description

@aatoe

1111

我的TS版本为:^4.3.4

我在VScode 尝试了一下你的demo,并不会发生转换。赋值虽然成功,并不会改变泛型。
其实这个例子本质没啥意义,当作探索TS边界挺好的。

3333

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions