mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
9 lines
326 B
TypeScript
9 lines
326 B
TypeScript
export * from './resource';
|
|
|
|
// https://www.raygesualdo.com/posts/flattening-object-keys-with-typescript-types/
|
|
export type FlattenObjectKeys<T extends Record<string, unknown>, Key = keyof T> = Key extends string
|
|
? T[Key] extends Record<string, unknown>
|
|
? `${Key}.${FlattenObjectKeys<T[Key]>}`
|
|
: `${Key}`
|
|
: never;
|