-
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
Conversation
@@ -398,7 +398,7 @@ export class Thread implements VariableStoreDelegate { | |||
} | |||
|
|||
this._pausedDetails = this._createPausedDetails(event); | |||
this._pausedDetails[kPausedEventSymbol] = event; |
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 😛 )
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
const out: any = {}; | |
const out: { [key: string]: V } = {}; |
should work
src/int-chrome/testSetup.ts
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
TIL multiline suggestions aren't a thing, somehow, but
Object.assign(launchArgs, argsWithDefaults)
should do the trick without casts
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably add this as preLaunchTask?: string;
in IMandatedConfiguration
src/targets/node/nodeLauncher.ts
Outdated
@@ -323,7 +323,7 @@ function readEnvFile(file: string): { [key: string]: string } { | |||
} | |||
|
|||
const buffer = stripBOM(fs.readFileSync(file, 'utf8')); | |||
const env = {}; | |||
const env: any = {}; |
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.
const env: any = {}; | |
const env: { [key: string]: string } = {}; |
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.
some suggestions
#36
Adds a couple tsconfig rules. Some 'any' casts where the intent is not clear, some actual type fixes.