Skip to content

Commit

Permalink
Added generic type signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
kallaspriit committed Sep 5, 2017
1 parent c3fec1a commit ff12e41
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export declare function normalizeType(arg: any[]): any[];
export declare function normalizeType(arg: any): any;
export declare function normalizeType<T>(arg: any): T;
export default normalizeType;
2 changes: 1 addition & 1 deletion build/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "normalize-type",
"version": "1.3.6",
"version": "1.4.0",
"description": "Normalizes string JavaScript values to have real type (so \"123\" becomes number 123 etc).",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ interface IndexableObject {

export function normalizeType(arg: any[]): any[];
export function normalizeType(arg: any): any;
export function normalizeType<T>(arg: any): T;
export function normalizeType(arg: any): any {
// handle arrays
if (Array.isArray(arg)) {
Expand Down

0 comments on commit ff12e41

Please sign in to comment.