From 1f85e5c368f2a09ede8bd6346f960573aa230471 Mon Sep 17 00:00:00 2001 From: Akash Vishwakarma Date: Wed, 30 Jan 2019 13:09:07 +0530 Subject: [PATCH] Renaming folder name as it is same as module name i am unable to import in test --- types/happy-pack/happypack-tests.ts | 5 +++++ types/{happypack => happy-pack}/index.d.ts | 9 +++++---- types/{happypack => happy-pack}/tsconfig.json | 8 ++++---- types/{happypack => happy-pack}/tslint.json | 0 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 types/happy-pack/happypack-tests.ts rename types/{happypack => happy-pack}/index.d.ts (73%) rename types/{happypack => happy-pack}/tsconfig.json (78%) rename types/{happypack => happy-pack}/tslint.json (100%) diff --git a/types/happy-pack/happypack-tests.ts b/types/happy-pack/happypack-tests.ts new file mode 100644 index 0000000000..7f2c24daf5 --- /dev/null +++ b/types/happy-pack/happypack-tests.ts @@ -0,0 +1,5 @@ +import * as happyPack from 'happy-pack'; + +const ref: happyPack = new happyPack({ + loaders: ['ts-loader'] +}); diff --git a/types/happypack/index.d.ts b/types/happy-pack/index.d.ts similarity index 73% rename from types/happypack/index.d.ts rename to types/happy-pack/index.d.ts index d865761784..e6f30343da 100644 --- a/types/happypack/index.d.ts +++ b/types/happy-pack/index.d.ts @@ -6,9 +6,9 @@ import { Plugin } from 'webpack'; -export = HappyPack; +export = happypack; -declare namespace HappyPack { +declare namespace happypack { interface PluginOptions { id?: string; threads?: number; @@ -16,6 +16,7 @@ declare namespace HappyPack { } } -declare class HappyPack extends Plugin { - constructor(options: HappyPack.PluginOptions); +declare class happypack extends Plugin { + constructor(options: happypack.PluginOptions); } + diff --git a/types/happypack/tsconfig.json b/types/happy-pack/tsconfig.json similarity index 78% rename from types/happypack/tsconfig.json rename to types/happy-pack/tsconfig.json index 82e6284376..bfd5e35551 100644 --- a/types/happypack/tsconfig.json +++ b/types/happy-pack/tsconfig.json @@ -2,12 +2,11 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6", - "dom" + "es6" ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -18,6 +17,7 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts" + "index.d.ts", + "happypack-tests.ts" ] } \ No newline at end of file diff --git a/types/happypack/tslint.json b/types/happy-pack/tslint.json similarity index 100% rename from types/happypack/tslint.json rename to types/happy-pack/tslint.json