Skip to content
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

[NewErrors] 4.9.0-dev.20221007 vs 4.8.4 #51118

Closed
typescript-bot opened this issue Oct 9, 2022 · 20 comments
Closed

[NewErrors] 4.9.0-dev.20221007 vs 4.8.4 #51118

typescript-bot opened this issue Oct 9, 2022 · 20 comments
Labels
Committed The team has roadmapped this issue

Comments

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 9, 2022

The following errors were reported by 4.9.0-dev.20221007, but not by 4.8.4
Pipeline that generated this bug
Logs for the pipeline run
File that generated the pipeline

This run considered 200 popular TS repos from GH (after skipping the top 0).

Successfully analyzed 110 of 200 visited repos
Outcome Count
Detected interesting changes 14
Detected no interesting changes 96
Git clone failed 2
Package install failed 49
Too many errors in old TS 37
Unknown failure 2

Investigation Status

Repo Errors Outcome
ant-design/ant-design 3 Correctly errors on illegal side-cast
codex-team/editor.js 1 Correct error, ref codex-team/editor.js#2131
darkreader/darkreader 8 #51059, by design
Eugeny/tabby 10 By design (checking for wrong property names?)
graphql/graphql-js 1 expected error is gone now 👍
JedWatson/react-select 1 Correctly errors on possible use of in operator on non-object
jupyterlab/jupyterlab 2 node.d.ts conflict
lensapp/lens 10 Correct new errors; ref #51118 (comment)
luin/ioredis 1 expected error is gone now 👍
react-bootstrap/react-bootstrap 2 Correct new error, probably; ref react-bootstrap/react-bootstrap#6465
reduxjs/reselect 2 #50870
sindresorhus/got 7 Correct error, ref sindresorhus/got#2163
Tencent/vConsole 6 Inference improvement -> contravariant failure
vercel/hyper 1 Simple conflict with node.d.ts
@typescript-bot
Copy link
Collaborator Author

ant-design/ant-design

tsconfig.json

@typescript-bot
Copy link
Collaborator Author

codex-team/editor.js

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.build.json

@typescript-bot
Copy link
Collaborator Author

darkreader/darkreader

2 of 6 projects failed to build with the old tsc and were ignored

src/api/tsconfig.json

  • error TS2339: Property 'getRandomValues' does not exist on type 'never'.
  • error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'number'.

src/tsconfig.json

  • error TS2339: Property 'getRandomValues' does not exist on type 'never'.
  • error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'number'.

tests/inject/tsconfig.json

  • error TS2339: Property 'getRandomValues' does not exist on type 'never'.
  • error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'number'.

tests/unit/tsconfig.json

  • error TS2339: Property 'getRandomValues' does not exist on type 'never'.
  • error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'number'.

@typescript-bot
Copy link
Collaborator Author

Eugeny/tabby

11 of 29 projects failed to build with the old tsc and were ignored

tabby-community-color-schemes/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-electron/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-linkifier/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-local/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-serial/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-ssh/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-telnet/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-terminal/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-terminal/tsconfig.typings.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

tabby-web-demo/tsconfig.json

  • error TS2352: Conversion of type 'MouseEvent & Record<"wheelDeltaY", unknown>' to type 'WheelEvent' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

@typescript-bot
Copy link
Collaborator Author

graphql/graphql-js

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

@typescript-bot
Copy link
Collaborator Author

JedWatson/react-select

3 of 5 projects failed to build with the old tsc and were ignored

packages/react-select/src/tests/tsconfig.json

@typescript-bot
Copy link
Collaborator Author

jupyterlab/jupyterlab

49 of 56 projects failed to build with the old tsc and were ignored

packages/services/examples/browser/tsconfig.json

  • error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; timeout(milliseconds: number): AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; }'.

packages/services/examples/typescript-browser-with-output/tsconfig.json

  • error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; timeout(milliseconds: number): AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; }'.

@typescript-bot
Copy link
Collaborator Author

lensapp/lens

6 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

webpack/tsconfig.json

@typescript-bot
Copy link
Collaborator Author

luin/ioredis

tsconfig.json

@typescript-bot
Copy link
Collaborator Author

react-bootstrap/react-bootstrap

test/tsconfig.json

  • error TS2345: Argument of type '(Element | ComponentClass<{}, any>) & Record<"setState", unknown>' is not assignable to parameter of type 'ReactInstance | null | undefined'.

tsconfig.json

  • error TS2345: Argument of type '(Element | ComponentClass<{}, any>) & Record<"setState", unknown>' is not assignable to parameter of type 'ReactInstance | null | undefined'.

@typescript-bot
Copy link
Collaborator Author

reduxjs/reselect

1 of 3 projects failed to build with the old tsc and were ignored

typescript_test/tsconfig.json

@typescript-bot
Copy link
Collaborator Author

sindresorhus/got

tsconfig.json

@typescript-bot
Copy link
Collaborator Author

Tencent/vConsole

tsconfig.json

  • error TS2741: Property '0' is missing in type 'string[]' but required in type 'RegExpMatchArray'.
  • error TS2339: Property 'apply' does not exist on type 'string extends keyof T ? T[keyof T & string] : any'.
  • error TS2322: Type '() => ReadableStreamReader<Uint8Array>' is not assignable to type '{ (options: { mode: "byob"; }): ReadableStreamBYOBReader; (): ReadableStreamDefaultReader<Uint8Array>; (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<...>; }'.

tsconfig.type.json

  • error TS2741: Property '0' is missing in type 'string[]' but required in type 'RegExpMatchArray'.
  • error TS2339: Property 'apply' does not exist on type 'string extends keyof T ? T[keyof T & string] : any'.
  • error TS2322: Type '() => ReadableStreamReader<Uint8Array>' is not assignable to type '{ (options: { mode: "byob"; }): ReadableStreamBYOBReader; (): ReadableStreamDefaultReader<Uint8Array>; (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<...>; }'.

@typescript-bot
Copy link
Collaborator Author

vercel/hyper

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; timeout(milliseconds: number): AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; }'.
    • file:///mnt/ts_downloads/hyper/node_modules/@types/node/globals.d.ts#L72 in app/tsconfig.json

@RyanCavanaugh
Copy link
Member

RyanCavanaugh commented Oct 11, 2022

ant-design:

  /**
   * `pagination` is not designed to accept `true` value, but in practice, many people assign `true`
   * to `pagination`, since they misunderstand that `pagination` can accept a boolean value.
   */
  it('Accepts pagination as true', () => {
    const { asFragment } = render(createTable({ pagination: true } as TableProps<any>));

This is now flagged as an error - not entirely clear why it wasn't before, but this sort of assertion is I think correctly not supposed to be allowed.

The other errors don't repro on nightly

@RyanCavanaugh
Copy link
Member

JedWatson/react-select - correctly errors on possible use of in operator on non-object

@RyanCavanaugh
Copy link
Member

sindresorhus/got - By design. Correct CFA of in operator (based on incorrect type definition) led to downstream code being type-unreachable.

@RyanCavanaugh
Copy link
Member

lensapp - correct new errors. This code had several deficits relative to the declared input type, which lib updates exposed:

  • The declared type of reader allowed it to possibly be a ReadableStreamBYOBReader , which has a required view argument to read
  • The declared type of pendingRead was a little off for some reason
  • getTimestamps was declared to return a RegExpMatchArray, which always has at least one element, but could actually return [ ]

@RyanCavanaugh
Copy link
Member

react-bootstrap: Looks like a correct error. Logged react-bootstrap/react-bootstrap#6465

@RyanCavanaugh RyanCavanaugh added the Committed The team has roadmapped this issue label Oct 11, 2022
@RyanCavanaugh
Copy link
Member

All done 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue
Projects
None yet
Development

No branches or pull requests

2 participants