1 | type StringLiteral<Type> = Type extends string ? (string extends Type ? never : Type) : never;
|
2 | declare const __OPAQUE_TYPE__: unique symbol;
|
3 | export type WithOpaque<Token extends string> = {
|
4 | readonly [__OPAQUE_TYPE__]: Token;
|
5 | };
|
6 | export type Opaque<Type, Token extends string> = Token extends StringLiteral<Token> ? Type & WithOpaque<Token> : never;
|
7 | export {};
|