mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-10-26 11:38:13 +00: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,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
|
||||
*/
|
||||
@ -7,7 +7,7 @@
|
||||
export type DeepPartial<T> = T extends null | undefined
|
||||
? T
|
||||
: T extends Array<infer ArrayType>
|
||||
? Array<DeepPartial<ArrayType>>
|
||||
? Array<DeepPartial<ArrayType>> | undefined
|
||||
: T extends Record<string | number | symbol, unknown>
|
||||
? { [P in keyof T]?: DeepPartial<T[P]> }
|
||||
: T
|
||||
? { [P in keyof T]?: DeepPartial<T[P]> } | undefined
|
||||
: Partial<T>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user