Skip to content

Commit

Permalink
fix: typescript fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 5, 2020
1 parent 17bc41b commit 3cf5964
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions core/instrument/src/babel/extract-component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as resolve from 'resolve';
import * as parser from '@babel/parser';
import { File } from '@babel/types';
import {
StoriesStore,
StoryArgument,
Expand Down Expand Up @@ -44,7 +45,7 @@ const componentFromParams = (

export const extractComponent = async (
componentName: string,
filePath?: string,
filePath: string,
parserOptions?: parser.ParserOptions,
resolveOptions?: resolve.SyncOpts,
initialAST?: File,
Expand All @@ -70,7 +71,7 @@ export const extractComponent = async (

export const extractSotreComponent = async (
store: StoriesStore,
filePath?: string,
filePath: string,
parserOptions?: parser.ParserOptions,
resolveOptions?: resolve.SyncOpts,
initialAST?: File,
Expand All @@ -86,6 +87,7 @@ export const extractSotreComponent = async (
filePath,
parserOptions,
resolveOptions,
initialAST,
);
if (component) {
store.components[componentName] = component;
Expand All @@ -102,6 +104,7 @@ export const extractSotreComponent = async (
filePath,
parserOptions,
resolveOptions,
initialAST,
);
if (component) {
store.components[componentName] = component;
Expand Down
2 changes: 1 addition & 1 deletion core/instrument/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"typeRoots": ["../../node_modules/@types", "node_modules/@types"]
},
"include": ["src/**/*", "src/typings.d.ts", "test"],
"exclude": ["node_modules/**"]
"exclude": ["node_modules/**", "test/**"]
}

0 comments on commit 3cf5964

Please sign in to comment.