-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stricter tsconfig settings #50
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -35,7 +35,7 @@ export function caseInsensitiveMerge<V>( | |||||
return {}; | ||||||
} | ||||||
|
||||||
const out = {}; | ||||||
const out: any = {}; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
should work |
||||||
const caseMapping: { [key: string]: string } = Object.create(null); // prototype-free object | ||||||
for (const obj of objs) { | ||||||
if (!obj) { | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ function formLaunchArgs( | |
|
||
const argsWithDefaults = { ...chromeLaunchConfigDefaults, ...launchArgs }; | ||
for (let k in argsWithDefaults) { | ||
launchArgs[k] = argsWithDefaults[k]; | ||
launchArgs[k] = (argsWithDefaults as any)[k]; // TODO@rob | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL multiline suggestions aren't a thing, somehow, but
should do the trick without casts |
||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,7 +228,7 @@ function createLaunchConfigFromContext( | |
dir += '/'; | ||
} | ||
} | ||
config['preLaunchTask'] = 'tsc: build - tsconfig.json'; | ||
(config as any)['preLaunchTask'] = 'tsc: build - tsconfig.json'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can probably add this as |
||
} | ||
config['outFiles'] = ['${workspaceFolder}/' + dir + '**/*.js']; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how much refactoring you wanna do here, but this is a good use case for a
WeakMap
(and actually most WeakMap polyfills work almost the same way as the code does here--defining a non-enumerable symbol on the key objects 😛 )