-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: PerformanceReports of unusually slow behaviorReports of unusually slow behavior
Milestone
Description
TypeScript Version: 3.6.2
Search Terms:
- union type
- partial
Repo
-
git clone https://github.com/Microsoft/typescript-template-language-service-decorator
-
npm install
-
Open
src/template-language-service-decorator.ts
-
On line 44, remove the any cast on the line:
for (const { name, wrapper } of this._wrappers) { (intercept[name] as any) = wrapper(languageService[name]!.bind(languageService)); }
-
Try compiling the project
Expected behavior:
This compiles with TS 3.4
Actual behavior:
Compile fails with TS 3.5+
src/template-language-service-decorator.ts:44:13 - error TS2590: Expression produces a union type that is too complex to represent.
44 intercept[name] = wrapper(languageService[name]!.bind(languageService));
~~~~~~~~~~~~~~~
The code likely needs to be rewritten here but I'm opening this issue to make sure the error is expected
Playground Link:
Related Issues:
AnyhowStep, misak113, seanblonien, mracette, anupam-io and 2 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: PerformanceReports of unusually slow behaviorReports of unusually slow behavior