Merge pull request #19816 from overleaf/jpa-type-tweaks

[web] minor typescript tweaks

GitOrigin-RevId: df459d2c00652a3d183cae123f39a01dd17c7ec6
This commit is contained in:
Jakob Ackermann
2024-08-07 08:05:08 +00:00
committed by Copybot
parent a278e70b27
commit d2464abc7c
6 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
export type Nullable<T> = T | null
// eslint-disable-next-line no-use-before-define, @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {}
type DeepReadonlyObject<T> = {
readonly [P in keyof T]: DeepReadonly<T[P]> // eslint-disable-line no-use-before-define
readonly [P in keyof T]: DeepReadonly<T[P]>
}
export type DeepReadonly<T> = T extends (infer R)[]