diff --git a/packages/stdlib/src/types/ts/array.ts b/packages/stdlib/src/types/ts/array.ts new file mode 100644 index 0000000..37d698d --- /dev/null +++ b/packages/stdlib/src/types/ts/array.ts @@ -0,0 +1,4 @@ +/** + * A type that can be either a single value or an array of values + */ +export type Arrayable = T | T[]; \ No newline at end of file diff --git a/packages/stdlib/src/types/ts/function.ts b/packages/stdlib/src/types/ts/function.ts new file mode 100644 index 0000000..bb88f96 --- /dev/null +++ b/packages/stdlib/src/types/ts/function.ts @@ -0,0 +1,9 @@ +/** + * Any function + */ +export type AnyFunction = (...args: any[]) => any; + +/** + * Void function + */ +export type VoidFunction = () => void; \ No newline at end of file diff --git a/packages/stdlib/src/types/ts/functions.ts b/packages/stdlib/src/types/ts/functions.ts deleted file mode 100644 index cd57094..0000000 --- a/packages/stdlib/src/types/ts/functions.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Any function - */ -export type AnyFunction = (...args: any[]) => any; \ No newline at end of file diff --git a/packages/stdlib/src/types/ts/index.ts b/packages/stdlib/src/types/ts/index.ts index 442cb14..c4cbedb 100644 --- a/packages/stdlib/src/types/ts/index.ts +++ b/packages/stdlib/src/types/ts/index.ts @@ -1,2 +1,3 @@ export * from './string'; -export * from './functions'; \ No newline at end of file +export * from './function'; +export * from './array'; \ No newline at end of file