From 52d5d86679a51368170e3201d0cde3563821a204 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Tue, 27 Jun 2017 09:03:17 -0700 Subject: [PATCH 1/2] Add typings for is-alphanumerical --- is-alphanumerical/index.d.ts | 7 +++++++ is-alphanumerical/is-alphanumerical-tests.ts | 7 +++++++ is-alphanumerical/tsconfig.json | 22 ++++++++++++++++++++ is-alphanumerical/tslint.json | 1 + 4 files changed, 37 insertions(+) create mode 100644 is-alphanumerical/index.d.ts create mode 100644 is-alphanumerical/is-alphanumerical-tests.ts create mode 100644 is-alphanumerical/tsconfig.json create mode 100644 is-alphanumerical/tslint.json diff --git a/is-alphanumerical/index.d.ts b/is-alphanumerical/index.d.ts new file mode 100644 index 0000000000..5974ec9813 --- /dev/null +++ b/is-alphanumerical/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for is-alphanumerical 1.0 +// Project: https://github.com/wooorm/is-alphanumerical/ +// Definitions by: Vu Tran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function isAlphanumerical(val: string | boolean | string): boolean; +export = isAlphanumerical; diff --git a/is-alphanumerical/is-alphanumerical-tests.ts b/is-alphanumerical/is-alphanumerical-tests.ts new file mode 100644 index 0000000000..3d6602c6df --- /dev/null +++ b/is-alphanumerical/is-alphanumerical-tests.ts @@ -0,0 +1,7 @@ +import isAlphanumerical = require('is-alphanumerical'); + +isAlphanumerical('a'); +isAlphanumerical('z'); +isAlphanumerical('0'); +isAlphanumerical('9'); +isAlphanumerical('💩'); diff --git a/is-alphanumerical/tsconfig.json b/is-alphanumerical/tsconfig.json new file mode 100644 index 0000000000..481957289e --- /dev/null +++ b/is-alphanumerical/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-alphanumerical-tests.ts" + ] +} diff --git a/is-alphanumerical/tslint.json b/is-alphanumerical/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/is-alphanumerical/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6c53e8db6e2551cfca54d49aa616b469baf17ab0 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Tue, 27 Jun 2017 17:08:37 -0700 Subject: [PATCH 2/2] fix typings --- is-alphanumerical/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/is-alphanumerical/index.d.ts b/is-alphanumerical/index.d.ts index 5974ec9813..940a005b08 100644 --- a/is-alphanumerical/index.d.ts +++ b/is-alphanumerical/index.d.ts @@ -3,5 +3,5 @@ // Definitions by: Vu Tran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function isAlphanumerical(val: string | boolean | string): boolean; +declare function isAlphanumerical(val: string | boolean | number): boolean; export = isAlphanumerical;