Skip to content

Conversation

typescript-bot
Copy link
Collaborator

This test run was triggerd by a request on #33716
Please review the diff and merge if no changes are unexpected.
You can view the build log here.

cc @microsoft/typescript

@typescript-bot typescript-bot force-pushed the user-baseline-updates branch 29 times, most recently from fe41570 to 56e20ad Compare March 17, 2020 04:31
@typescript-bot typescript-bot force-pushed the user-baseline-updates branch 18 times, most recently from 9b155e7 to 9f1fc9e Compare March 19, 2020 19:48
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Found a bug from the vs code errors. I'll continue looking.

[XX:XX:XX] Node flags detected: --max_old_space_size=4095
[XX:XX:XX] Using gulpfile /vscode/gulpfile.js
Done in ?s.
[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/search/common/searchModel.ts(609,21): Type 'FileMatch | FileMatch[]' must have a '[Symbol.iterator]()' method that returns an iterator.
Copy link
Member

Choose a reason for hiding this comment

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

Control flow error is wrong, appears to be using the declared type: #37480

[XX:XX:XX] Using gulpfile /vscode/gulpfile.js
Done in ?s.
[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/search/common/searchModel.ts(609,21): Type 'FileMatch | FileMatch[]' must have a '[Symbol.iterator]()' method that returns an iterator.
[XX:XX:XX] Error: /vscode/src/vs/workbench/electron-browser/parts/titlebar/titlebarPart.ts(222,5): Type 'null' is not assignable to type 'string'.
Copy link
Member

Choose a reason for hiding this comment

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

CSSStyleDeclaration.zoom no longer has null in the type.

Type 'null' is not assignable to type 'string'.
[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/splitview/splitview.ts(113,3): Type '"none" | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
[XX:XX:XX] Error: /vscode/src/vs/editor/browser/controller/pointerHandler.ts(45,45): Property 'msTouchAction' does not exist on type 'CSSStyleDeclaration'. Did you mean 'touchAction'?
Copy link
Member

Choose a reason for hiding this comment

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

class MsPointerHandler, for IE10 and IE11 compatibility, are now broken.

@typescript-bot typescript-bot force-pushed the user-baseline-updates branch 2 times, most recently from 5ae819f to e754882 Compare March 19, 2020 22:11
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

office-ui-fabric errors look correct, and I would have suspected external libraries changing if I hadn't tested with an old build of the compiler.

@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/react-northstar/src/components/Box/Box.tsx(69,1):
@fluentui/docs: TS2322: Type '{ styles: PropTypes.Requireable<object>; variables: PropTypes.Requireable<object>; design: PropTypes.Requireable<PropTypes.InferProps<{ position: PropTypes.Requireable<string>; display: PropTypes.Requireable<...>; ... 19 more ...; maxHeight: PropTypes.Requireable<...>; }>>; ... 5 more ...; accessibility: PropTypes.R...' is not assignable to type 'WeakValidationMap<WithAsProp<BoxProps>>'.
@fluentui/docs: The types of 'design[nominalTypeHack].position' are incompatible between these types.
@fluentui/docs: Type 'string' is not assignable to type 'PositionProperty'.
Copy link
Member

Choose a reason for hiding this comment

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

this error is correct as far as I can tell; one CSS wrapper has a precise type and the other only has 'string'.

Copy link
Member

Choose a reason for hiding this comment

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

it does disappear when building with dd6811f (from March 2), so office-ui-fabric will have to fix it somehow

@fluentui/docs: Type 'Requireable<InferProps<{ position: Requireable<string>; display: Requireable<string>; top: Requireable<string>; right: Requireable<string>; bottom: Requireable<...>; ... 16 more ...; maxHeight: Requireable<...>; }>>' is not assignable to type 'Validator<ComponentDesignProp>'.
@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/react-northstar/src/components/Provider/Provider.tsx
@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/react-northstar/src/components/Provider/Provider.tsx(210,3):
@fluentui/docs: TS2322: Type 'Requireable<InferProps<{ siteVariables: Requireable<object>; componentVariables: Requireable<object>; componentStyles: Requireable<object>; fontFaces: Requireable<InferProps<...>[]>; staticStyles: Requireable<...>; animations: Requireable<...>; }>>' is not assignable to type 'Validator<ThemeInput<any>>'.
Copy link
Member

Choose a reason for hiding this comment

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

this is the other unique error; haven't figured out what is going on here

Copy link
Member

Choose a reason for hiding this comment

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

object is no longer assignable to Record<string, ComponentSlotStyleInput<{}, {}>> (because the target has an index signature and the source doesn't -- the Record's value type isn't important.)

This is also correct as far as I can tell, but also disappears with the build from March 2.

@typescript-bot typescript-bot force-pushed the user-baseline-updates branch from e754882 to 034bf30 Compare March 19, 2020 23:36
[!] (plugin rpt2) Error: /vue-next/packages/vue/src/devCheck.ts(2,11): semantic error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead?
packages/vue/src/devCheck.ts
Error: /vue-next/packages/vue/src/devCheck.ts(2,11): semantic error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead?
[!] (plugin rpt2) Error: /vue-next/packages/runtime-core/src/apiOptions.ts(137,18): semantic error TS2344: Type 'Function & T[key]["get"]' does not satisfy the constraint '(...args: any) => any'.
Copy link
Member

Choose a reason for hiding this comment

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

Seems correct, ReturnType<Function> isn't allowed because Function is callable but doesn't have any signatures. I'm not sure why we didn't complain about this before.

It's pretty easy to fix: change

export type ExtractComputedReturns<T extends any> = {
  [key in keyof T]: T[key] extends { get: Function }
    ? ReturnType<T[key]['get']>
    : ReturnType<T[key]>
}

to

export type ExtractComputedReturns<T extends Record<string, (...args:any[]) => any>> = {
    [key in keyof T]: T[key] extends { get: (...args:any[]) => any }
    ? ReturnType<T[key]['get']>
    : ReturnType<T[key]>
}

I'll either contact the vue team or send a PR.

@typescript-bot typescript-bot force-pushed the user-baseline-updates branch from 034bf30 to 20d4505 Compare March 20, 2020 00:27
@typescript-bot typescript-bot force-pushed the user-baseline-updates branch from 20d4505 to d689fab Compare March 20, 2020 04:30
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I'm going to merge this, and send a followup PR to add "node" zone.js' tsconfig

Comment on lines +3 to +35
node_modules/acorn/acorn-loose/dist/acorn-loose.js(3,10): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(3,35): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(3,48): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(4,45): error TS2339: Property 'acorn' does not exist on type 'typeof import("/acorn/node_modules/acorn/acorn-loose/dist/acorn-loose")'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(4,80): error TS2339: Property 'acorn' does not exist on type 'typeof import("/acorn/node_modules/acorn/acorn-loose/dist/acorn-loose")'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(4,106): error TS2339: Property 'acorn' does not exist on type 'typeof import("/acorn/node_modules/acorn/acorn-loose/dist/acorn-loose")'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(83,12): error TS2339: Property 'next' does not exist on type 'LooseParser'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(110,16): error TS2339: Property 'lookAhead' does not exist on type 'LooseParser'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(111,44): error TS2339: Property 'next' does not exist on type 'LooseParser'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(159,10): error TS2339: Property 'next' does not exist on type 'LooseParser'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(160,17): error TS2339: Property 'parseTopLevel' does not exist on type 'LooseParser'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(216,38): error TS2339: Property 'raisedAt' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(218,32): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(220,13): error TS2322: Type '{ start: any; end: any; type: any; value: any; }' is not assignable to type 'boolean'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(220,33): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(220,103): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(222,41): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(224,13): error TS2322: Type '{ start: any; end: any; type: any; value: any; }' is not assignable to type 'boolean'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(224,33): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(226,13): error TS2322: Type '{ start: any; end: any; type: any; value: any; }' is not assignable to type 'boolean'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(227,24): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(230,41): error TS2339: Property 'pos' does not exist on type 'SyntaxError'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(251,33): error TS2322: Type '{ start: any; end: any; type: any; value: string; }' is not assignable to type 'boolean'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(254,23): error TS2339: Property 'loc' does not exist on type 'true'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(256,53): error TS2339: Property 'start' does not exist on type 'true'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(257,53): error TS2339: Property 'end' does not exist on type 'true'.
node_modules/acorn/acorn-loose/dist/acorn-loose.js(1243,96): error TS1313: The body of an 'if' statement cannot be the empty statement.
node_modules/acorn/acorn-walk/dist/walk.js(3,10): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-walk/dist/walk.js(3,35): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-walk/dist/walk.js(3,48): error TS2304: Cannot find name 'define'.
node_modules/acorn/acorn-walk/dist/walk.js(4,45): error TS2339: Property 'acorn' does not exist on type 'typeof import("/acorn/node_modules/acorn/acorn-walk/dist/walk")'.
node_modules/acorn/acorn-walk/dist/walk.js(4,80): error TS2339: Property 'acorn' does not exist on type 'typeof import("/acorn/node_modules/acorn/acorn-walk/dist/walk")'.
node_modules/acorn/acorn-walk/dist/walk.js(164,43): error TS2339: Property 'node' does not exist on type 'never'.
Copy link
Member

Choose a reason for hiding this comment

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

These errors are correct, and repro on 3.8 as well.

Copy link
Member

Choose a reason for hiding this comment

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

Well, locally, maxNodeModuleJsDepth: 0 -- when you change it to maxNodeModuleJsDepth: 1, the errors appear in the editor, but otherwise only appear in tsc. Not sure what is going on here.

Aside: why isn't it maxNodeModulesJSDepth to matches node_modules and JS?

Copy link
Member

Choose a reason for hiding this comment

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

defaultView now has the same type as window

@@ -0,0 +1,7 @@
Exit Code: 1
Standard output:
node_modules/zone.js/dist/zone.js.d.ts(600,21): error TS2503: Cannot find namespace 'NodeJS'.
Copy link
Member

Choose a reason for hiding this comment

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

tsconfig types entry needs to have "node" added

@@ -0,0 +1,11 @@
Exit Code: 1
Standard output:
lib/ExternalModule.js(305,28): error TS2554: Expected 1 arguments, but got 0.
Copy link
Member

Choose a reason for hiding this comment

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

getUsedName is used 3 times with no arguments, so it's likely intentional -- or perhaps a repeated error.

The usage is odd, though, so it's probably fine to force an optionality annotation.

Comment on lines +5 to +6
lib/library/SystemLibraryPlugin.js(127,35): error TS2554: Expected 1 arguments, but got 0.
lib/optimize/ConcatenatedModule.js(205,32): error TS2554: Expected 1 arguments, but got 0.
Copy link
Member

Choose a reason for hiding this comment

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

other 2 usages of getUsedName

Exit Code: 1
Standard output:
lib/ExternalModule.js(305,28): error TS2554: Expected 1 arguments, but got 0.
lib/Stats.js(68,31): error TS2554: Expected 3 arguments, but got 2.
Copy link
Member

Choose a reason for hiding this comment

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

context object is technically optional although all the other calls provide a starting context

lib/Stats.js(68,31): error TS2554: Expected 3 arguments, but got 2.
lib/library/SystemLibraryPlugin.js(127,35): error TS2554: Expected 1 arguments, but got 0.
lib/optimize/ConcatenatedModule.js(205,32): error TS2554: Expected 1 arguments, but got 0.
tooling/format-file-header.js(151,34): error TS2556: Expected 1-2 arguments, but got 0 or more.
Copy link
Member

Choose a reason for hiding this comment

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

ha ha spreading a RegExpExecArray will surely never go wrong.

seriously, this is annoying if You Know What You're Doing, but I would feel comfortable making people write a cast for this.

@sandersn sandersn merged commit 114fe4d into microsoft:master Mar 20, 2020
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I looked at uglify; the errors there come from two sources, both of which are intended to be optional but are not documented as such.

node_modules/uglify-js/lib/compress.js(5347,37): error TS2554: Expected 0 arguments, but got 1.
node_modules/uglify-js/lib/compress.js(5603,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'.
Property '0' is missing in type 'any[]' but required in type '[string | RegExp, (string | undefined)?]'.
node_modules/uglify-js/lib/compress.js(5761,32): error TS2554: Expected 2 arguments, but got 1.
Copy link
Member

Choose a reason for hiding this comment

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

this is clearly intended to be optional; the parameter name is false_by_default

node_modules/uglify-js/lib/propmangle.js(80,29): error TS2554: Expected 0 arguments, but got 1.
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/propmangle.js(163,26): error TS2554: Expected 2 arguments, but got 1.
Copy link
Member

Choose a reason for hiding this comment

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

TreeTransformer takes two functions and the second is indeed optional, but it's not immediately obvious because there's no naming convention and the optionality check is hundreds of lines from the parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants