diff --git a/packages/ts-types/src/types/collection.ts b/packages/ts-types/src/types/collection.ts index 51e4ca2..2523716 100644 --- a/packages/ts-types/src/types/collection.ts +++ b/packages/ts-types/src/types/collection.ts @@ -33,6 +33,8 @@ export interface AnyArray extends Array {} export interface AnyArrayLike extends ArrayLike {} /** - * Typescript recommends using this instead of the generic object type. See https://github.com/microsoft/TypeScript/issues/21732 + * Typescript recommends using Record instead of the generic object type. See https://github.com/microsoft/TypeScript/issues/21732. + * However, this breaks current functionality so we aliased the object type and disabled eslint for now. */ -export type AnyObject = Record; +// eslint-disable-next-line @typescript-eslint/ban-types +export type AnyObject = object; diff --git a/packages/ts-types/src/types/function.ts b/packages/ts-types/src/types/function.ts index e1278d0..b4db84e 100644 --- a/packages/ts-types/src/types/function.ts +++ b/packages/ts-types/src/types/function.ts @@ -20,6 +20,6 @@ import { AnyObject } from './collection'; export type AnyFunction = (...args: any[]) => T; /** - * A constructor for any type `T`. `T` defaults to `object` when not explicitly supplied. + * A constructor for any type `T`. `T` defaults to `AnyObject` when not explicitly supplied. */ export type AnyConstructor = new (...args: any[]) => T;