Skip to content

Commit

Permalink
Revert last
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mesquita-Morris committed Jan 7, 2022
1 parent ec792ae commit 9d2cf39
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/node/functions.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/** Prototype of a class constructor. */
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> = (...args: Array<TArgs>) => TResult;
export declare type Function<TArgs, TResult> = (arg: TArgs) => 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. */
export declare type Predicate<TArg> = Function<TArg, boolean>;
/** A supplier function, one with no parameters that returns a 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.4",
"version": "1.0.0-rc.5",
"description": "Common TypeScript types used in development of other projects.",
"main": "./lib/node/index.js",
"types": "./lib/node/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
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> = (...args: Array<TArgs>) => TResult;
export type Function<TArgs, TResult> = (arg: TArgs) => TResult;

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

/** A function taking one argument and returning a boolean result. */
export type Predicate<TArg> = Function<TArg, boolean>;
Expand Down

0 comments on commit 9d2cf39

Please sign in to comment.