-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
debtCode quality issuesCode quality issuesengineeringVS Code - Build / issue tracking / etc.VS Code - Build / issue tracking / etc.
Milestone
Description
Problem
For an example service defined in VS Code core:
export class MyService {
constructor(
private readonly value: string,
@ITextModelService private readonly textModelResolverService: ITextModelService
) { }
}
It is currently possible to use the instantiation service to create an instance of MyService
that passes undefined
for value
:
instantiationService.createInstance(MyService, undefined);
This does not produce any compile errors. It does bypass our strict null checking however and can cause unexpected runtime behavior.
Proposed fix
Enable strictFunctionTypes
in our code base
There are about 800 or so errors related to this in our code base today. While some of these errors are simple, many are rather cryptic and some may prove difficult to fix
mitorez
Metadata
Metadata
Assignees
Labels
debtCode quality issuesCode quality issuesengineeringVS Code - Build / issue tracking / etc.VS Code - Build / issue tracking / etc.