We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3d4c22 commit 39aff98Copy full SHA for 39aff98
src/type/char.ts
@@ -0,0 +1,6 @@
1
+
2
+export type Char<Type extends string> = Type extends `${infer FirstChar}${infer Rest}`
3
+ ? Rest extends ''
4
+ ? Type
5
+ : never
6
+ : never;
0 commit comments