feat: initial commit
This commit is contained in:
1
src/utils/types/relation.ts
Normal file
1
src/utils/types/relation.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type Relation<T> = T;
|
||||
22
src/utils/types/uuid.ts
Normal file
22
src/utils/types/uuid.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
type HexChar =
|
||||
| '0'
|
||||
| '1'
|
||||
| '2'
|
||||
| '3'
|
||||
| '4'
|
||||
| '5'
|
||||
| '6'
|
||||
| '7'
|
||||
| '8'
|
||||
| '9'
|
||||
| 'a'
|
||||
| 'b'
|
||||
| 'c'
|
||||
| 'd'
|
||||
| 'e'
|
||||
| 'f';
|
||||
type UUIDv4Segment<Length extends number> =
|
||||
`${HexChar extends string ? HexChar : never}${string extends `${Length}` ? never : never}`; // Simplified for brevity
|
||||
|
||||
export type UUIDv4 =
|
||||
`${UUIDv4Segment<8>}-${UUIDv4Segment<4>}-4${UUIDv4Segment<3>}-${'8' | '9' | 'a' | 'b'}${UUIDv4Segment<3>}-${UUIDv4Segment<12>}`;
|
||||
Reference in New Issue
Block a user