Skip to content

馃 User test baselines have changed - #32991

Closed
TypeScript Bot (typescript-bot) wants to merge 1 commit into
microsoft:masterfrom
typescript-bot:user-update-Microsoft-20190702
Closed

TypeScript Bot (typescript-bot) wants to merge 1 commit into
microsoft:masterfrom
typescript-bot:user-update-Microsoft-20190702

Conversation

@typescript-bot

Copy link
Copy Markdown
Contributor

Please review the diff and merge if no changes are unexpected.
You can view the build log here.

cc Wesley Wigham (@weswigham) Nathan Shively-Sanders (@sandersn) Ryan Cavanaugh (@RyanCavanaugh)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open issues:

  1. chrome-devtools-frontend crashes with an assert in mergeJSSymbols, in which a symbol is being merged into itself.
  2. constructor function member resolution is broken/unstable in acorn.
  3. puppeteer wants Worker from lib.dom.d.ts to be compatible with @types/node@8.10.51.

(3) isn't that important except that I don't know why it changed today.

node_modules/acorn/dist/acorn.es.js(3026,14): error TS2339: Property 'value' does not exist on type 'TokenType'.
node_modules/acorn/dist/acorn.es.js(3026,40): error TS2339: Property 'inGeneratorContext' does not exist on type 'TokenType'.
node_modules/acorn/dist/acorn.es.js(3029,8): error TS2339: Property 'exprAllowed' does not exist on type 'TokenType'.
node_modules/acorn/dist/acorn.es.js(3590,26): error TS2339: Property 'validFlags' does not exist on type 'RegExpValidationState'.

@sandersn Nathan Shively-Sanders (sandersn) Aug 20, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some members are not resolved outside RegExpValidationState methods anymore. The language service also seems to be unstable inside methods -- if you get quick info on this.flags/**/, you get nothing, but get quick info on this/**/.flags then this.flags/**/ and you get the correct symbol.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #33013 to track this.

node_modules/bluebird/js/release/using.js(97,23): error TS2339: Property 'data' does not exist on type 'FunctionDisposer'.
node_modules/bluebird/js/release/using.js(131,72): error TS2339: Property 'classString' does not exist on type 'typeof ret'.
node_modules/bluebird/js/release/using.js(223,15): error TS2350: Only a void function can be called with the 'new' keyword.
node_modules/bluebird/js/release/util.js(200,32): error TS2339: Property 'foo' does not exist on type 'FakeConstructor'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better (?) type checking leads us to find an any for FakeConstructor.prototype, meaning that any property accesses are allowed:

function toFastProperties(obj) {
  function FakeConstructor() { }
  FakeConstructor.prototype = obj;
  var receiver = new FakeConstructor();
  return receiver.foo;
}

Type 'Function' has no construct signatures.
node_modules/lodash/_cloneBuffer.js(4,69): error TS2339: Property 'nodeType' does not exist on type '(buffer: any, isDeep?: boolean | undefined) => any'.
node_modules/lodash/_cloneBuffer.js(7,80): error TS2339: Property 'nodeType' does not exist on type '{ "../../../tests/cases/user/lodash/node_modules/lodash/_cloneBuffer": (buffer: any, isDeep?: boolean | undefined) => any; }'.
node_modules/lodash/_cloneBuffer.js(22,14): error TS2577: Return type annotation circularly references itself.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better symbol construction avoids circularity -- tests showed this too I think.

node_modules/npm/lib/npm.js(445,34): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'.
node_modules/npm/lib/npm.js(460,13): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'.
node_modules/npm/lib/npm.js(465,7): error TS2367: This condition will always return 'false' since the types 'NodeModule | undefined' and '{ "../../../tests/cases/user/npm/node_modules/npm/lib/npm": typeof EventEmitter; }' have no overlap.
node_modules/npm/lib/npm.js(465,7): error TS2367: This condition will always return 'false' since the types 'NodeModule | undefined' and '{ "../../../tests/cases/user/npm/node_modules/npm/lib/npm": typeof internal.EventEmitter; }' have no overlap.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the namespace-printing change

@@ -1,8 +0,0 @@
Exit Code: 1
Standard output:
lib/Compilation.js(538,5): error TS2322: Type 'Readonly<{ error: string; warn: string; info: string; log: string; debug: string; trace: string; group: string; groupCollapsed: string; groupEnd: string; profile: string; profileEnd: string; time: string; clear: string; status: string; }>' is not assignable to type 'string'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum fix

node_modules/uglify-js/lib/propmangle.js(94,30): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/propmangle.js(146,29): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/scope.js(88,21): error TS2339: Property 'defun' does not exist on type 'SymbolDef'.
node_modules/uglify-js/lib/scope.js(88,35): error TS2339: Property 'defun' does not exist on type 'SymbolDef'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave it uglify to choose names from COMMON LISP.

I'm not sure why this wasn't an error before; defun is not assigned in the body of any SymbolDef method, only in random functions elsewhere in the module. It could be that checking of the SymbolDef.prototype object literal is correctly delayed so that it doesn't turn up any.

lib/Page.js(908,19): error TS2503: Cannot find namespace 'Protocol'.
lib/Page.js(1309,15): error TS2503: Cannot find namespace 'Protocol'.
lib/Target.js(23,15): error TS2503: Cannot find namespace 'Protocol'.
lib/Target.js(87,7): error TS2322: Type 'Promise<Worker | Worker>' is not assignable to type 'Promise<Worker>'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worker from lib.dom.d.ts isn't compatible with Worker from @types/node^8.10.51.

@sandersn

Copy link
Copy Markdown
Member

Puppeteer's Worker confusion is from the getTypeFromTypeReference fix: previously,
const {Worker} = require('./Worker') would make /** @type {Worker} */ resolve to class Worker extends EventEmitter in lib/Worker.js.

Now, /** @type {Worker} */ instead resolves to interface Worker extends EventTarget in lib.dom.d.ts

This seems wrong. I'll poke around and file a bug if I convince myself that's the case.

@sandersn

Copy link
Copy Markdown
Member

Filed ##32993 to track (3).

@sandersn

Copy link
Copy Markdown
Member

(1) is a result of some incorrect binding, I think. Filed #32997 to track it.

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants