Skip to content

Commit

Permalink
V1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mesquita-Morris committed Mar 7, 2022
1 parent aa14646 commit f473498
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/node/functions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
export declare type Constructor<TResult> = new (...args: Array<any>) => TResult;
/** A function that takes a variable number of arguments and returns a result. */
export declare type Function<TArgs, TResult> = (arg: TArgs) => TResult;
/** A function used in an array-oriented callback. */
export declare type CallbackFunction<TValue, TResult> = (value: TValue, index: number, source: Array<TValue>) => TResult;
/** A function that takes a variable number of arguments and returns a result. */
export declare type FunctionVA<TArgs, TResult> = (...args: Array<TArgs>) => TResult;
/** A function taking one argument and returning a boolean result. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@steelbreeze/types",
"version": "1.0.0-rc.5",
"version": "1.0.0",
"description": "Common TypeScript types used in development of other projects.",
"main": "./lib/node/index.js",
"types": "./lib/node/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export type Constructor<TResult> = new (...args: Array<any>) => TResult;
/** A function that takes a variable number of arguments and returns a result. */
export type Function<TArgs, TResult> = (arg: TArgs) => TResult;

/** A function used in an array-oriented callback. */
export type CallbackFunction<TValue, TResult> = (value: TValue, index: number, source: Array<TValue>) => TResult;

/** A function that takes a variable number of arguments and returns a result. */
export type FunctionVA<TArgs, TResult> = (...args: Array<TArgs>) => TResult;

Expand Down

0 comments on commit f473498

Please sign in to comment.