Skip to content

Compile errors in VS Code codebase with latest TS nightly  #42225

Closed
@mjbvz

Description

@mjbvz

🕗 Version & Regression Information

  • This changed between versions 4.2.0-dev.20201207 and 4.2.0-dev.20210105

Repo

  • Update VS Code to use the latest nightly TypeScript version (yarn add typescript@next)
  • Run compile in the codebase yarn run watch

Issue

This produces around 16 compile errors. Most of these look like false positives to me:

[21:49:47] Error: vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts(1232,24): The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.
[21:49:47] Error: vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts(1232,72): Argument of type 'undefined' is not assignable to parameter of type 'Uint8Array'.
[21:49:47] Error: vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts(176,99): Property 'getActions' does not exist on type 'readonly IAction[] | IActionProvider'.
  Property 'getActions' does not exist on type 'readonly IAction[]'.
[21:49:47] Error: vscode/src/vs/base/browser/ui/actionbar/actionbar.ts(267,9): Type '(readonly IAction[] & any[]) | (IAction & any[]) | (IAction | readonly IAction[])[]' is not assignable to type 'readonly IAction[]'.
  Type '(IAction | readonly IAction[])[]' is not assignable to type 'readonly IAction[]'.
    Type 'IAction | readonly IAction[]' is not assignable to type 'IAction'.
      Type 'readonly IAction[]' is missing the following properties from type 'IAction': id, label, tooltip, class, and 4 more.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHostTypeConverters.ts(1249,24): Property 'language' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'language' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHostTypeConverters.ts(1250,22): Property 'scheme' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'scheme' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHostTypeConverters.ts(1251,30): Property 'pattern' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'pattern' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHostTypeConverters.ts(1251,94): Property 'pattern' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'pattern' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHostTypeConverters.ts(1252,25): Property 'exclusive' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'exclusive' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHost.api.impl.ts(199,26): Property 'scheme' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'scheme' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/workbench/api/common/extHost.api.impl.ts(202,58): Property 'exclusive' does not exist on type 'DocumentFilter | readonly (string | DocumentFilter)[]'.
  Property 'exclusive' does not exist on type 'readonly (string | DocumentFilter)[]'.
[21:49:47] Error: vscode/src/vs/editor/common/modes/languageSelector.ts(58,11): Property 'language' does not exist on type 'LanguageFilter | readonly (string | LanguageFilter)[]'.
[21:49:47] Error: vscode/src/vs/editor/common/modes/languageSelector.ts(58,21): Property 'pattern' does not exist on type 'LanguageFilter | readonly (string | LanguageFilter)[]'.
[21:49:47] Error: vscode/src/vs/editor/common/modes/languageSelector.ts(58,30): Property 'scheme' does not exist on type 'LanguageFilter | readonly (string | LanguageFilter)[]'.
[21:49:47] Error: vscode/src/vs/editor/common/modes/languageSelector.ts(58,38): Property 'hasAccessToAllModels' does not exist on type 'LanguageFilter | readonly (string | LanguageFilter)[]'.
[21:49:47] Error: vscode/src/vs/editor/common/modes/languageFeatureRegistry.ts(28,21): Property 'exclusive' does not exist on type 'LanguageFilter | readonly (string | LanguageFilter)[]'.
  Property 'exclusive' does not exist on type 'readonly (string | LanguageFilter)[]'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions