Skip to content

Commit

Permalink
feat(utilities): expose Arr to the docs (#780)
Browse files Browse the repository at this point in the history
* docs(utilities): expose `Arr` to the docs

Fixes this error:

> [warning] `Arr`, defined in
> `./projects/utilities/packages/utilities/src/lib/types.ts`,
> is referenced by `AbstractCtor.A` but not included in the documentation

* feat: rename `Arr` to `AnyReadonlyArray`

If you get a compiler error, just rename your code.
This type was previously meant to be internal
so we deemed this a minor version and not a major.
favna authored Jul 27, 2024
1 parent 6f32cac commit 997614c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/utilities/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -60,19 +60,18 @@ export type ArgumentTypes<F extends (...args: any[]) => unknown> = F extends (..

/**
* A readonly array of any values.
* @private
*/
export type Arr = readonly any[];
export type AnyReadonlyArray = readonly any[];

/**
* A generic constructor with parameters
*/
export type Ctor<A extends Arr = readonly any[], R = any> = new (...args: A) => R;
export type Ctor<A extends AnyReadonlyArray = readonly any[], R = any> = new (...args: A) => R;

/**
* A generic abstract constructor with parameters
*/
export type AbstractCtor<A extends Arr = readonly any[], R = any> = abstract new (...args: A) => R;
export type AbstractCtor<A extends AnyReadonlyArray = readonly any[], R = any> = abstract new (...args: A) => R;

/**
* A generic constructor without parameters

0 comments on commit 997614c

Please sign in to comment.