From 1f99aca88026b7101c1c343b7a9b5d0f4763f406 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Thu, 7 Jun 2018 07:07:33 +0200 Subject: [PATCH 1/3] Added types for is-touch-device --- types/is-touch-device/index.d.ts | 6 +++++ .../is-touch-device/is-touch-device-tests.ts | 3 +++ types/is-touch-device/tsconfig.json | 23 +++++++++++++++++++ types/is-touch-device/tslint.json | 1 + 4 files changed, 33 insertions(+) create mode 100644 types/is-touch-device/index.d.ts create mode 100644 types/is-touch-device/is-touch-device-tests.ts create mode 100644 types/is-touch-device/tsconfig.json create mode 100644 types/is-touch-device/tslint.json diff --git a/types/is-touch-device/index.d.ts b/types/is-touch-device/index.d.ts new file mode 100644 index 0000000000..7a17cbea63 --- /dev/null +++ b/types/is-touch-device/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for is-touch-device 1.0 +// Project: https://github.com/airbnb/is-touch-device +// Definitions by: Christian Rackerseder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function isTouchDevice(): boolean; diff --git a/types/is-touch-device/is-touch-device-tests.ts b/types/is-touch-device/is-touch-device-tests.ts new file mode 100644 index 0000000000..7f1d558649 --- /dev/null +++ b/types/is-touch-device/is-touch-device-tests.ts @@ -0,0 +1,3 @@ +import isTouchDevice from 'is-touch-device'; + +isTouchDevice() === true; diff --git a/types/is-touch-device/tsconfig.json b/types/is-touch-device/tsconfig.json new file mode 100644 index 0000000000..4ab8fbd5cb --- /dev/null +++ b/types/is-touch-device/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-touch-device-tests.ts" + ] +} diff --git a/types/is-touch-device/tslint.json b/types/is-touch-device/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-touch-device/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6f529a4f5a14d74e0fe07671123f9c22029cabde Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Thu, 7 Jun 2018 07:15:42 +0200 Subject: [PATCH 2/3] Changed website link --- types/http-link-header/index.d.ts | 2 +- types/website-scraper/index.d.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/http-link-header/index.d.ts b/types/http-link-header/index.d.ts index a8dca563d2..cbcb4cbfdb 100644 --- a/types/http-link-header/index.d.ts +++ b/types/http-link-header/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for http-link-header 0.6 // Project: https://github.com/jhermsmeier/node-http-link-header -// Definitions by: Christian Rackerseder +// Definitions by: Christian Rackerseder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface Reference { diff --git a/types/website-scraper/index.d.ts b/types/website-scraper/index.d.ts index 1e16c80191..07185a1102 100644 --- a/types/website-scraper/index.d.ts +++ b/types/website-scraper/index.d.ts @@ -1,9 +1,11 @@ // Type definitions for website-scraper v1.2.x // Project: https://github.com/s0ph1e/node-website-scraper -// Definitions by: Christian Rackerseder +// Definitions by: Christian Rackerseder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +/// + import * as request from 'request'; declare namespace websiteScraper { From a079e3b5e9300f8b2f48a7c6d5190bf99336ddb1 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Thu, 7 Jun 2018 07:20:35 +0200 Subject: [PATCH 3/3] Fixed unit test --- types/is-touch-device/is-touch-device-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/is-touch-device/is-touch-device-tests.ts b/types/is-touch-device/is-touch-device-tests.ts index 7f1d558649..5ae2e1eff5 100644 --- a/types/is-touch-device/is-touch-device-tests.ts +++ b/types/is-touch-device/is-touch-device-tests.ts @@ -1,3 +1,3 @@ import isTouchDevice from 'is-touch-device'; -isTouchDevice() === true; +if (isTouchDevice()) {}