Renaming folder name as it is same as module name i am unable to import in test

This commit is contained in:
Akash Vishwakarma
2019-01-30 13:09:07 +05:30
parent 6aa2877dbc
commit 1f85e5c368
4 changed files with 14 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
import * as happyPack from 'happy-pack';
const ref: happyPack = new happyPack({
loaders: ['ts-loader']
});

View File

@@ -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);
}

View File

@@ -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"
]
}