Skip to content

[NewErrors] 4.3.0-dev.20210228 vs 4.2.2 #43004

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

Closed
typescript-bot opened this issue Feb 28, 2021 · 4 comments
Closed

[NewErrors] 4.3.0-dev.20210228 vs 4.2.2 #43004

typescript-bot opened this issue Feb 28, 2021 · 4 comments
Assignees
Labels
Infrastructure Issue relates to TypeScript team infrastructure Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@typescript-bot
Copy link
Collaborator

The following errors were reported by 4.3.0-dev.20210228, but not by 4.2.2

cdr/code-server

9 of 47 projects failed to build with the old tsc

lib/vscode/extensions/html-language-features/server/tsconfig.json

lib/vscode/extensions/typescript-language-features/tsconfig.json

ReactiveX/rxjs

7 of 11 projects failed to build with the old tsc

src/tsconfig.cjs.spec.json

src/tsconfig.esm5.rollup.json

typeorm/typeorm

tsconfig.json

reduxjs/redux-devtools

17 of 51 projects failed to build with the old tsc

packages/redux-devtools/tsconfig.json

  • error TS2322: Type 'MonitorProps' is not assignable to type 'IntrinsicAttributes & Omit<any, "monitorState" | "nextActionId" | "actionsById" | "stagedActionIds" | "skippedActionIds" | "committedState" | "currentStateIndex" | "computedStates" | "isLocked" | "isPaused" | "dispatch">'.
  • error TS2322: Type 'MonitorProps & { store: LiftedStore<S, A, MonitorState>; }' is not assignable to type 'IntrinsicAttributes & Omit<any, "monitorState" | "nextActionId" | "actionsById" | "stagedActionIds" | "skippedActionIds" | "committedState" | "currentStateIndex" | "computedStates" | "isLocked" | "isPaused" | "dispatch">'.
@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Mar 1, 2021

I think the Redux changes might have been caused by #42819. I think the hint for me is the Omit<any, ...>. (@weswigham)

The new "sufficiently overlaps" error is very confusing, but is expected fallout from #25330. I really wish we had discussed this at a design meeting since it's a potentially disruptive breaking change. In some of the examples above, we're seeing undesirable behavior due to strictPropertyInitialization being off. I guess testing a this.func and not calling it is always suspicious regardless of strictPropertyInitialization, so maybe that's why we never hit a similar issue with uncalled function checks. (@elibarzilay, @RyanCavanaugh)

@weswigham
Copy link
Member

@DanielRosenwasser I've tracked down the change that broke redux-devtools, and it's not that one; it's df5ffc0 . Omit<any, Whatever> is just an alias for {[index:string]: any; [index:number]: any}; the comparison in the error apparently only worked by virtue of the number index signature assignability rule that got removed. MonitorProps doesn't have an index signature, so it fails now.

@RyanCavanaugh
Copy link
Member

@DanielRosenwasser Wes and I spoke and recommend that we keep the assignability-target rule in place when the target has both string and numeric index signatures

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Mar 3, 2021

Thanks for investigating! Let me look into it quickly.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Mar 9, 2021
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.3.1 milestone Mar 9, 2021
@DanielRosenwasser DanielRosenwasser added Infrastructure Issue relates to TypeScript team infrastructure and removed Needs Investigation This issue needs a team member to investigate its status. labels Apr 12, 2021
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issue relates to TypeScript team infrastructure Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

No branches or pull requests

5 participants