mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-09 13:51:57 -04:00
fix(commons): type of deep partial utility type
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
b11dbd51c8
commit
deee8e885f
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
export type DeepPartial<T> = T extends null | undefined
|
export type DeepPartial<T> = T extends null | undefined
|
||||||
? T
|
? T
|
||||||
: T extends Array<infer ArrayType>
|
: T extends Array<infer ArrayType>
|
||||||
? Array<DeepPartial<ArrayType>>
|
? Array<DeepPartial<ArrayType>> | undefined
|
||||||
: T extends Record<string | number | symbol, unknown>
|
: T extends Record<string | number | symbol, unknown>
|
||||||
? { [P in keyof T]?: DeepPartial<T[P]> }
|
? { [P in keyof T]?: DeepPartial<T[P]> } | undefined
|
||||||
: T
|
: Partial<T>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue