From e8ba41e4e2d402c16a47b8443cacc9cd861cce67 Mon Sep 17 00:00:00 2001 From: Johannes Fahrenkrug Date: Fri, 11 Nov 2016 15:21:45 -0500 Subject: [PATCH] Add type definition for keymirror --- keymirror/index.d.ts | 7 +++++++ keymirror/keymirror-tests.ts | 3 +++ keymirror/tsconfig.json | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 keymirror/index.d.ts create mode 100644 keymirror/keymirror-tests.ts create mode 100644 keymirror/tsconfig.json diff --git a/keymirror/index.d.ts b/keymirror/index.d.ts new file mode 100644 index 0000000000..e8c28c6d34 --- /dev/null +++ b/keymirror/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for keymirror 0.1.1 +// Project: https://github.com/STRML/keyMirror +// Definitions by: Johannes Fahrenkrug +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function KeyMirror(obj: Object): Object; +export = KeyMirror; diff --git a/keymirror/keymirror-tests.ts b/keymirror/keymirror-tests.ts new file mode 100644 index 0000000000..ace29f9947 --- /dev/null +++ b/keymirror/keymirror-tests.ts @@ -0,0 +1,3 @@ +import keyMirror = require('keymirror'); + +keyMirror({key1: null, key2: null}); diff --git a/keymirror/tsconfig.json b/keymirror/tsconfig.json new file mode 100644 index 0000000000..ce57da7581 --- /dev/null +++ b/keymirror/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "keymirror-tests.ts" + ] +}