Skip to content

Commit

Permalink
Fix build.ts type error (#210)
Browse files Browse the repository at this point in the history
* Update build.ts to fix eslint disable comment
  • Loading branch information
LukeSheard authored Dec 29, 2020
1 parent 11912bb commit efd9939
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/modular-scripts/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ const typescriptConfig: TSConfig = {};
throw new Error('Failed to load Typescript configuration');
}

// Casting to a variable so that configObject.exclude is set to the correct typing
// Since configObject is a index type all values are "any" implicitly.
const exclude: string[] = (configObject.exclude as string[]) || [];

Object.assign(typescriptConfig, configObject, {
// TODO: should probably include the original exclude in this
exclude: distinct([
Expand All @@ -165,9 +169,7 @@ const typescriptConfig: TSConfig = {};
'bower_components',
'jspm_packages',
'tmp',
// Unclear why this is resolving as "any"
// eslint-disable-next-line
...(configObject.exclude || []),
...exclude,
]),
});

Expand Down

0 comments on commit efd9939

Please sign in to comment.