Skip to content

TypeScript utility type: Extends #1393

@bmingles

Description

@bmingles

As a developer I'd like to be able to assert that a union type is a subset of another. A simple "Extends" utility type as suggested here should work:

type Extends<T, U extends T> = U;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttriageIssue requires triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions