mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Use recursive mapped type
This commit is contained in:
@@ -3,5 +3,5 @@ import df = require('deep-freeze');
|
||||
class Foo {
|
||||
foo: string;
|
||||
}
|
||||
const foo: Foo = df(new Foo());
|
||||
const foo = df(new Foo());
|
||||
const items = [{id: 0, name: 'first'}];
|
||||
|
||||
Vendored
+1
-1
@@ -10,4 +10,4 @@ declare function deepFreeze<T>(a: T[]): ReadonlyArray<DeepReadonly<T>>;
|
||||
declare function deepFreeze<T extends Function>(f: T): T;
|
||||
declare function deepFreeze<T>(o: T): DeepReadonly<T>;
|
||||
|
||||
type DeepReadonly<T> = Readonly<{ [P in keyof T]: Readonly<T[P]> }>;
|
||||
type DeepReadonly<T> = Readonly<{ [P in keyof T]: DeepReadonly<T[P]> }>;
|
||||
|
||||
Reference in New Issue
Block a user