ts-type
Version:
add some typescript type and re-export some build-in typescript type
18 lines (17 loc) • 596 B
TypeScript
export type ITSToStringLiteralAllowedType = string | number | boolean | bigint;
/**
* `${T}`
*/
export type ITSToStringLiteral<T extends ITSToStringLiteralAllowedType> = `${T}`;
/**
* T & `${T}`
*/
export type ITSTypeAndStringLiteral<T extends ITSToStringLiteralAllowedType> = T | ITSToStringLiteral<T>;
/**
* S & `${T}`
*/
export type ITSAndStringLiteral<T extends ITSToStringLiteralAllowedType, S = string> = S | ITSToStringLiteral<T>;
/**
* S & T & `${T}`
*/
export type ITSAndTypeAndStringLiteral<T extends ITSToStringLiteralAllowedType, S = string> = S | ITSTypeAndStringLiteral<T>;