Fixed bug that resulted in any inference (#16955)

Fixed a bug that resulted in `any` being inferred for nested recursive generics.
Formatted type declaration on multiple lines for readability.
Updated maintainers list.
This commit is contained in:
Aluan Haddad
2017-06-04 22:02:42 -04:00
committed by Mohamed Hegazy
parent defaf2888e
commit 08786315ca

View File

@@ -1,6 +1,6 @@
// Type definitions for deep-freeze 0.1
// Project: https://github.com/substack/deep-freeze
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Aluan Haddad <https://github.com/aluanhaddad>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -11,5 +11,7 @@ declare function deepFreeze<T extends Function>(f: T): T;
declare function deepFreeze<T>(o: T): deepFreeze.DeepReadonly<T>;
declare namespace deepFreeze {
type DeepReadonly<T> = Readonly<{ [P in keyof T]: DeepReadonly<T[P]> }>;
type DeepReadonly<T> = {
readonly [P in keyof T]: DeepReadonly<T[P]>
};
}