Skip to content

Commit

Permalink
Only use node types where necessary (storybookjs#9213)
Browse files Browse the repository at this point in the history
Only use node types where necessary

Co-authored-by: Norbert de Langen <ndelangen@me.com>
  • Loading branch information
ndelangen authored Dec 21, 2019
2 parents 8a9f09a + 8ba9c2b commit 1f5b228
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function withFrameworkExtensions(basePreset: Preset, mapper: FrameworkPresetMapp

module.exports = withFrameworkExtensions(commonPreset, framework => {
try {
return require.resolve(`./frameworks/${framework}/preset`);
return require.resolve(`./frameworks/${framework}/preset`) as string;
} catch (err) {
// there is no custom config for the user's framework, do nothing
return null;
Expand Down
3 changes: 2 additions & 1 deletion lib/addons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src"
"rootDir": "./src",
"types": ["webpack-env"]
},
"include": [
"src/**/*"
Expand Down
3 changes: 2 additions & 1 deletion lib/channels/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src"
"rootDir": "./src",
"types": ["node"]
},
"include": [
"src/**/*"
Expand Down
3 changes: 2 additions & 1 deletion lib/client-logger/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src"
"rootDir": "./src",
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es5",
"types": ["node", "jest"],
"types": ["jest"],
"lib": ["es2017", "dom"]
},
"exclude": [
Expand Down

0 comments on commit 1f5b228

Please sign in to comment.