Add Prettify helper type

This commit is contained in:
mindfulminun committed 2023-04-04 00:40:26 -05:00
1 parent cc14c078ed
commit 4343355672
1 file changed
+7 -1
+7 -1
View File
@@ -7,7 +7,13 @@ export type Repeated<
T,
N extends number,
R extends readonly T[] = [],
> = R['length'] extends N ? R : Repeated<T, N, readonly [T, ...R]>;
> = R['length'] extends N ? R : Repeated<T, N, readonly [T, ...R]>
/**
*
*/
// deno-lint-ignore ban-types
export type Prettify<T> = { [K in keyof T]: T[K] } & {}
/**
* Creates an iterable that always yields the given value.