diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-07-01 16:37:50 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-07-01 16:37:50 +0200 |
commit | ce9e0788317b25e5d297ed38d9fed0754a341288 (patch) | |
tree | 29563a39c73ded16cd93eb7b5c5664d1ece944ac /util/types.ts | |
parent | 8ff39cbe6300ca479584fe7d85ff03a1f65bc9b0 (diff) |
WIP sentence API
Diffstat (limited to 'util/types.ts')
-rw-r--r-- | util/types.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/types.ts b/util/types.ts new file mode 100644 index 0000000..f03a242 --- /dev/null +++ b/util/types.ts @@ -0,0 +1,8 @@ +/** + * @type DeepPartial<T> makes all properties of type T optional, but keep + * array types intact + */ +export type DeepPartial<T> = { + [K in keyof T]?: T[K] extends Array<infer U> ? Array<U> : DeepPartial<T[K]>; +}; + |