From edc2bf6f9597788997a7fc62b4b2f0d44fb2b247 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 24 Dec 2018 12:33:22 +0100 Subject: [PATCH] [next-tick] Add types --- types/next-tick/index.d.ts | 8 ++++++++ types/next-tick/next-tick-tests.ts | 3 +++ types/next-tick/tsconfig.json | 23 +++++++++++++++++++++++ types/next-tick/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/next-tick/index.d.ts create mode 100644 types/next-tick/next-tick-tests.ts create mode 100644 types/next-tick/tsconfig.json create mode 100644 types/next-tick/tslint.json diff --git a/types/next-tick/index.d.ts b/types/next-tick/index.d.ts new file mode 100644 index 0000000000..09f87243a1 --- /dev/null +++ b/types/next-tick/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for next-tick 1.0 +// Project: https://github.com/medikoo/next-tick#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = nextTick; + +declare function nextTick(callback: () => void): void; diff --git a/types/next-tick/next-tick-tests.ts b/types/next-tick/next-tick-tests.ts new file mode 100644 index 0000000000..4e91651911 --- /dev/null +++ b/types/next-tick/next-tick-tests.ts @@ -0,0 +1,3 @@ +import nextTick = require('next-tick'); + +nextTick(() => {}); diff --git a/types/next-tick/tsconfig.json b/types/next-tick/tsconfig.json new file mode 100644 index 0000000000..af4623e50d --- /dev/null +++ b/types/next-tick/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", + "next-tick-tests.ts" + ] +} diff --git a/types/next-tick/tslint.json b/types/next-tick/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/next-tick/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }