Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/Typescript/TypeScript Type/TS Declaration/
TS Exclude
Search

TS Exclude

Created
Created
2021 Jul 15 5:57
Refs
Refs
 
 
 
 
How can I remove a wider type from a union type without removing its subtypes in TypeScript?
Using the Exclude operator doesn't work. type test = Exclude // produces type test = never I can understand why "except strings" also means excluding all the string literals, but how can I obtain 'a'|'b' out of 'a'|'b'|string? If needed, assume latest TypeScript.
How can I remove a wider type from a union type without removing its subtypes in TypeScript?
https://stackoverflow.com/questions/51954558/how-can-i-remove-a-wider-type-from-a-union-type-without-removing-its-subtypes-in
How can I remove a wider type from a union type without removing its subtypes in TypeScript?
 
 
 

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/Typescript/TypeScript Type/TS Declaration/
TS Exclude
Copyright Seonglae Cho