mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 19:04:46 +00:00
feat(packages/stdlib): add function and array types
This commit is contained in:
4
packages/stdlib/src/types/ts/array.ts
Normal file
4
packages/stdlib/src/types/ts/array.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/**
|
||||||
|
* A type that can be either a single value or an array of values
|
||||||
|
*/
|
||||||
|
export type Arrayable<T> = T | T[];
|
||||||
9
packages/stdlib/src/types/ts/function.ts
Normal file
9
packages/stdlib/src/types/ts/function.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* Any function
|
||||||
|
*/
|
||||||
|
export type AnyFunction = (...args: any[]) => any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Void function
|
||||||
|
*/
|
||||||
|
export type VoidFunction = () => void;
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
/**
|
|
||||||
* Any function
|
|
||||||
*/
|
|
||||||
export type AnyFunction = (...args: any[]) => any;
|
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
export * from './string';
|
export * from './string';
|
||||||
export * from './functions';
|
export * from './function';
|
||||||
|
export * from './array';
|
||||||
Reference in New Issue
Block a user