Skip to content

Commit

Permalink
Merge pull request #7831 from storybookjs/7829-source-loader-tsignore
Browse files Browse the repository at this point in the history
Source-loader: Selectively ignore typescript errors in generated code
  • Loading branch information
shilman committed Aug 21, 2019
2 parents 8beffdc + 2ac5a76 commit bf79bfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/source-loader/src/server/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function transform(inputSource) {
localDependencies,
idsToFrameworks,
}) => `
// @ts-ignore-start
var withSourceLoader = require('@storybook/source-loader/preview').withSource;
var __SOURCE_PREFIX__ = "${prefix.replace(/\\([^\\ ])/g, '\\\\$1')}";
var __STORY__ = ${sourceJson};
Expand All @@ -23,6 +24,7 @@ export function transform(inputSource) {
var __MODULE_DEPENDENCIES__ = ${JSON.stringify(dependencies)};
var __LOCAL_DEPENDENCIES__ = ${JSON.stringify(localDependencies)};
var __IDS_TO_FRAMEWORKS__ = ${JSON.stringify(idsToFrameworks)};
// @ts-ignore-end
${source}
`
Expand Down

0 comments on commit bf79bfb

Please sign in to comment.