Skip to content

Commit

Permalink
chore: use extends unknown everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
andnp committed Mar 11, 2019
1 parent 7b783bc commit 4bdf1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/types/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export type TaggedObject<T extends Record<ObjectKeys, object>, Key extends Objec
*/
export type DeepPartial<T> = Partial<{
[k in Keys<T>]:
T[k] extends any[] ? Array<DeepPartial<T[k][number]>> :
T[k] extends Array<unknown> ? Array<DeepPartial<T[k][number]>> :
T[k] extends AnyFunc ? T[k] :
T[k] extends object ? DeepPartial<T[k]> :
T[k];
Expand Down Expand Up @@ -214,7 +214,7 @@ export type Optional<T extends object, K extends Keys<T>> = CombineObjects<
*/
export type DeepReadonly<T> = Readonly<{
[k in Keys<T>]:
T[k] extends any[] ? ReadonlyArray<DeepReadonly<T[k][number]>> :
T[k] extends Array<unknown> ? ReadonlyArray<DeepReadonly<T[k][number]>> :
T[k] extends AnyFunc ? T[k] :
T[k] extends object ? DeepReadonly<T[k]> :
T[k];
Expand Down
4 changes: 2 additions & 2 deletions src/types/predicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AnyFunc } from './functions';
/** no-doc */
export type KnownProblemPrototypeKeys = 'toString' | 'toLocaleString' | 'hasOwnProperty' | 'isPrototypeOf' | 'propertyIsEnumerable' | 'constructor' | 'valueOf';
/** no-doc */
export type ArrayPrototypeKeys = Keys<any[]>;
export type ArrayPrototypeKeys = Keys<Array<unknown>>;
/** no-doc */
export type NumberPrototypeKeys = Keys<number>;
/** no-doc */
Expand All @@ -19,7 +19,7 @@ export type FunctionPrototypeKeys = Keys<Function>; // tslint:disable-line

export type IsNever<S extends string> = Not<(Record<S, True> & Record<string, False>)[S]>;
export type IsType<T, X> = X extends T ? True : False;
export type IsArray<T> = T extends any[] ? True : False;
export type IsArray<T> = T extends Array<unknown> ? True : False;
export type IsNumber<T> = T extends number ? True : False;
export type IsString<T> = T extends string ? True : False;
export type IsFunction<T> =
Expand Down

0 comments on commit 4bdf1ad

Please sign in to comment.