mirror of https://github.com/ghostfolio/ghostfolio
2 changed files with 10 additions and 1 deletions
@ -0,0 +1,7 @@ |
|||||
|
// Removes the open string type (e.g. OtherString of Stripe), which matches
|
||||
|
// every string, and keeps only the string literals
|
||||
|
export type StringLiteral<T> = T extends string |
||||
|
? string extends T |
||||
|
? never |
||||
|
: T |
||||
|
: never; |
||||
Loading…
Reference in new issue