8000 Nullable<T> types on TypeScript - aka Maybe Types from Flow · Issue #23477 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Nullable<T> types on TypeScript - aka Maybe Types from Flow #23477
Closed
@rdsedmundo

Description

@rdsedmundo

I'd like to know if there's any kind of implementation of Nullable types like in C# or what Flow does called as Maybe Types. I haven't found anything here in the repository exactly like that's still opened nor in the documentation.

What I'm using right now is something like: type Nullable<T> = T | undefined | null. But I think a built-in solution for that (even if it would be like this type I'm using) would be more sophisticated. I saw that TypeScript 2.8 is adding NonNullable<T> globally, so I think the inverse has its use cases as well.

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