From e6f4f4a4333ffa577883c521e1b7204411aae7bb Mon Sep 17 00:00:00 2001 From: Simon Graband Date: Mon, 21 Jun 2021 15:53:08 +0200 Subject: [PATCH] Transpile theia to es6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transpiles theia to es6. To keep support of es5 based vscode extensions, the @es5ClassCompat tag was used. The tag was also applied to be used with theia es5 plugins. Contributed on behalf of STMicroelectronics Signed-off-by: Simon Graband Co-authored-by: Paul Maréchal --- CHANGELOG.md | 1 + configs/base.tsconfig.json | 4 +- .../src/generator/webpack-generator.ts | 20 ----- packages/core/src/browser/navigatable.ts | 4 +- packages/core/src/browser/saveable.ts | 4 +- .../core/src/browser/tree/tree-widget.tsx | 2 +- .../marker-tree-label-provider.spec.ts | 2 +- .../browser/plugin-contribution-handler.ts | 5 +- .../main/browser/view/tree-view-widget.tsx | 2 +- .../plugin-ext/src/plugin/command-registry.ts | 2 +- packages/plugin-ext/src/plugin/types-impl.ts | 89 ++++++++++++++++--- ...search-in-workspace-result-tree-widget.tsx | 2 +- .../browser/task-problem-matcher-registry.ts | 6 +- .../workspace-uri-contribution.spec.ts | 2 +- 14 files changed, 96 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45fefab2f74d7..7621b5b36874a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ [Breaking Changes:](#breaking_changes_1.16.0) +- [core] moved from ES5 to ES2017 [#9436](https://github.com/eclipse-theia/theia/pull/9436) - Contributed on behalf of STMicroelectronics - [monaco] upgraded to monaco 0.23.0 including replacement of `quickOpen` API (0.20.x) with `quickInput` API (0.23.x) [#9154](https://github.com/eclipse-theia/theia/pull/9154) - [call-hierarchy] `CurrentEditorAccess` is deprecated. Use the version implemented in the `editor` package instead. The services in `call-hierarchy` that previously used the local `CurrentEditorAccess` no longer do. [#9681](https://github.com/eclipse-theia/theia/pull/9681) - [workspace] `WorkspaceCommandContribution.addFolderToWorkspace` no longer accepts `undefined`. `WorkspaceService.addRoot` now accepts a URI or a URI[]. [#9684](https://github.com/eclipse-theia/theia/pull/9684) diff --git a/configs/base.tsconfig.json b/configs/base.tsconfig.json index 7175a17cf0299..4995b44044d30 100644 --- a/configs/base.tsconfig.json +++ b/configs/base.tsconfig.json @@ -14,10 +14,10 @@ "resolveJsonModule": true, "module": "commonjs", "moduleResolution": "node", - "target": "es5", + "target": "ES2017", "jsx": "react", "lib": [ - "es6", + "ES2017", "dom" ], "sourceMap": true diff --git a/dev-packages/application-manager/src/generator/webpack-generator.ts b/dev-packages/application-manager/src/generator/webpack-generator.ts index f10462cf47517..b6f062a32461c 100644 --- a/dev-packages/application-manager/src/generator/webpack-generator.ts +++ b/dev-packages/application-manager/src/generator/webpack-generator.ts @@ -195,26 +195,6 @@ module.exports = { { test: /\\.plist$/, type: 'asset/resource' - }, - { - test: /\\.js$/, - // include only es6 dependencies to transpile them to es5 classes - include: /vscode-ws-jsonrpc|vscode-jsonrpc|vscode-languageserver-protocol|vscode-languageserver-types/, - use: { - loader: 'babel-loader', - options: { - presets: ['@babel/preset-env'], - plugins: [ - // reuse runtime babel lib instead of generating it in each js file - '@babel/plugin-transform-runtime', - // ensure that classes are transpiled - '@babel/plugin-transform-classes' - ], - // see https://github.com/babel/babel/issues/8900#issuecomment-431240426 - sourceType: 'unambiguous', - cacheDirectory: true - } - } } ] }, diff --git a/packages/core/src/browser/navigatable.ts b/packages/core/src/browser/navigatable.ts index 49efbbadc5c42..9429dc76ee007 100644 --- a/packages/core/src/browser/navigatable.ts +++ b/packages/core/src/browser/navigatable.ts @@ -45,14 +45,14 @@ export namespace NavigatableWidget { return arg instanceof BaseWidget && Navigatable.is(arg); } export function* getAffected( - widgets: IterableIterator | ArrayLike, + widgets: Iterable, context: MaybeArray ): IterableIterator<[URI, T & NavigatableWidget]> { const uris = Array.isArray(context) ? context : [context]; return get(widgets, resourceUri => uris.some(uri => uri.isEqualOrParent(resourceUri))); } export function* get( - widgets: IterableIterator | ArrayLike, + widgets: Iterable, filter: (resourceUri: URI) => boolean = () => true ): IterableIterator<[URI, T & NavigatableWidget]> { for (const widget of widgets) { diff --git a/packages/core/src/browser/saveable.ts b/packages/core/src/browser/saveable.ts index ad4ca17f276f9..cea603bfaa8f2 100644 --- a/packages/core/src/browser/saveable.ts +++ b/packages/core/src/browser/saveable.ts @@ -161,11 +161,11 @@ export namespace SaveableWidget { export function is(widget: Widget | undefined): widget is SaveableWidget { return !!widget && 'closeWithoutSaving' in widget; } - export function getDirty(widgets: IterableIterator | ArrayLike): IterableIterator { + export function getDirty(widgets: Iterable): IterableIterator { return get(widgets, Saveable.isDirty); } export function* get( - widgets: IterableIterator | ArrayLike, + widgets: Iterable, filter: (widget: T) => boolean = () => true ): IterableIterator { for (const widget of widgets) { diff --git a/packages/core/src/browser/tree/tree-widget.tsx b/packages/core/src/browser/tree/tree-widget.tsx index edfa083040d3c..8dccf0cfdc2bf 100644 --- a/packages/core/src/browser/tree/tree-widget.tsx +++ b/packages/core/src/browser/tree/tree-widget.tsx @@ -989,7 +989,7 @@ export class TreeWidget extends ReactWidget implements StatefulWidget { decorations.push(node.decorationData); } if (this.decorations.has(node.id)) { - decorations.push(...this.decorations.get(node.id)); + decorations.push(...this.decorations.get(node.id) || []); } return decorations.sort(TreeDecoration.Data.comparePriority); } diff --git a/packages/markers/src/browser/marker-tree-label-provider.spec.ts b/packages/markers/src/browser/marker-tree-label-provider.spec.ts index d15e6eec2e92f..f862922ebec14 100644 --- a/packages/markers/src/browser/marker-tree-label-provider.spec.ts +++ b/packages/markers/src/browser/marker-tree-label-provider.spec.ts @@ -57,7 +57,7 @@ before(() => { testContainer.bind(WorkspaceVariableContribution).toSelf().inSingletonScope(); testContainer.bind(ApplicationShell).toConstantValue({ currentChanged: new Signal({}), - widgets: () => [] + widgets: [] // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); testContainer.bind(WidgetManager).toConstantValue({ diff --git a/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts b/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts index d2abed4ee425a..3792190f5593a 100644 --- a/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts +++ b/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts @@ -299,8 +299,9 @@ export class PluginContributionHandler { } } - if (contributions.colors) { - pushContribution('colors', () => this.colors.register(...contributions.colors)); + const colors = contributions.colors; + if (colors) { + pushContribution('colors', () => this.colors.register(...colors)); } if (contributions.taskDefinitions) { diff --git a/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx b/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx index 4a89cb8586a40..ff5fc1e1d25b8 100644 --- a/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx +++ b/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx @@ -283,7 +283,7 @@ export class TreeViewWidget extends TreeViewWelcomeWidget { }); const children = this.getCaption(node); - return React.createElement('div', attrs, ...children); + return React.createElement('div', attrs, children); } protected getCaption(node: TreeNode): React.ReactNode { diff --git a/packages/plugin-ext/src/plugin/command-registry.ts b/packages/plugin-ext/src/plugin/command-registry.ts index a5e877d93256f..93d283a1762e8 100644 --- a/packages/plugin-ext/src/plugin/command-registry.ts +++ b/packages/plugin-ext/src/plugin/command-registry.ts @@ -102,7 +102,7 @@ export class CommandRegistryImpl implements CommandRegistryExt { // Using the KnownCommand exclusions, convert the commands manually return KnownCommands.map(id, args, (mappedId: string, mappedArgs: any[] | undefined, mappedResult: KnownCommands.ConversionFunction) => { const mr: KnownCommands.ConversionFunction = mappedResult; - return this.proxy.$executeCommand(mappedId, ...mappedArgs).then((result: any) => { + return this.proxy.$executeCommand(mappedId, ...mappedArgs || []).then((result: any) => { if (!result) { return undefined; } diff --git a/packages/plugin-ext/src/plugin/types-impl.ts b/packages/plugin-ext/src/plugin/types-impl.ts index 830dffdfc8780..8b99e33f181b3 100644 --- a/packages/plugin-ext/src/plugin/types-impl.ts +++ b/packages/plugin-ext/src/plugin/types-impl.ts @@ -24,7 +24,7 @@ import { UUID } from '@theia/core/shared/@phosphor/coreutils'; import { illegalArgument } from '../common/errors'; -import * as theia from '@theia/plugin'; +import type * as theia from '@theia/plugin'; import { URI as CodeURI, UriComponents } from '@theia/core/shared/vscode-uri'; import { relative } from '../common/paths-util'; import { startsWithIgnoreCase } from '@theia/core/lib/common/strings'; @@ -33,6 +33,7 @@ import { SymbolKind } from '../common/plugin-api-rpc-model'; import { FileSystemProviderErrorCode, markAsFileSystemProviderError } from '@theia/filesystem/lib/common/files'; import * as paths from 'path'; import { ObjectsTransferrer } from '../common/rpc-protocol'; +import { es5ClassCompat } from '../common/types'; /** * A reviver that takes URI's transferred via JSON.stringify() and makes @@ -52,6 +53,7 @@ export function reviver(key: string | undefined, value: any): any { * We cannot simply upgrade the dependency, because the current version 3.x * is not compatible with our current codebase */ +@es5ClassCompat export class URI extends CodeURI implements theia.Uri { protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean); protected constructor(components: UriComponents); @@ -114,6 +116,7 @@ export class URI extends CodeURI implements theia.Uri { } } +@es5ClassCompat export class Disposable { private disposable: undefined | (() => void); @@ -207,6 +210,7 @@ export enum SourceControlInputBoxValidationType { Information = 2 } +@es5ClassCompat export class ColorTheme implements theia.ColorTheme { constructor(public readonly kind: ColorThemeKind) { } } @@ -233,6 +237,7 @@ export namespace TextEditorSelectionChangeKind { } } +@es5ClassCompat export class Position { private _line: number; private _character: number; @@ -394,6 +399,7 @@ export class Position { } } +@es5ClassCompat export class Range { protected _start: Position; protected _end: Position; @@ -528,6 +534,7 @@ export class Range { } } +@es5ClassCompat export class Selection extends Range { private _anchor: Position; private _active: Position; @@ -595,6 +602,7 @@ export enum EnvironmentVariableMutatorType { Prepend = 3 } +@es5ClassCompat export class SnippetString { static isSnippetString(thing: {}): thing is SnippetString { @@ -676,11 +684,13 @@ export class SnippetString { } } +@es5ClassCompat export class ThemeColor { constructor(public id: string) { } } +@es5ClassCompat export class ThemeIcon { static readonly File: ThemeIcon = new ThemeIcon('file'); @@ -739,6 +749,7 @@ export enum ConfigurationTarget { Memory } +@es5ClassCompat export class RelativePattern { base: string; @@ -769,6 +780,7 @@ export enum IndentAction { Outdent = 3 } +@es5ClassCompat export class TextEdit { protected _range: Range; @@ -877,6 +889,7 @@ export enum CompletionItemKind { TypeParameter = 24 } +@es5ClassCompat export class CompletionItem implements theia.CompletionItem { label: string; @@ -899,6 +912,7 @@ export class CompletionItem implements theia.CompletionItem { } } +@es5ClassCompat export class CompletionList { isIncomplete?: boolean; @@ -923,16 +937,7 @@ export enum DebugConsoleMode { MergeWithParent = 1 } -export class DiagnosticRelatedInformation { - location: Location; - message: string; - - constructor(location: Location, message: string) { - this.location = location; - this.message = message; - } -} - +@es5ClassCompat export class Location { uri: URI; range: Range; @@ -958,6 +963,17 @@ export class Location { } } +@es5ClassCompat +export class DiagnosticRelatedInformation { + location: Location; + message: string; + + constructor(location: Location, message: string) { + this.location = location; + this.message = message; + } +} + export enum DiagnosticTag { Unnecessary = 1, Deprecated = 2, @@ -967,6 +983,7 @@ export enum CompletionItemTag { Deprecated = 1, } +@es5ClassCompat export class Diagnostic { range: Range; message: string; @@ -995,6 +1012,7 @@ export enum MarkerTag { Deprecated = 2, } +@es5ClassCompat export class ParameterInformation { label: string | [number, number]; documentation?: string | MarkdownString; @@ -1005,6 +1023,7 @@ export class ParameterInformation { } } +@es5ClassCompat export class SignatureInformation { label: string; documentation?: string | MarkdownString; @@ -1023,6 +1042,7 @@ export enum SignatureHelpTriggerKind { ContentChange = 3, } +@es5ClassCompat export class SignatureHelp { signatures: SignatureInformation[]; activeSignature: number; @@ -1033,6 +1053,7 @@ export class SignatureHelp { } } +@es5ClassCompat export class Hover { public contents: MarkdownString[] | theia.MarkedString[]; @@ -1062,6 +1083,7 @@ export enum DocumentHighlightKind { Write = 2 } +@es5ClassCompat export class DocumentHighlight { public range: Range; @@ -1078,6 +1100,7 @@ export class DocumentHighlight { export type Definition = Location | Location[]; +@es5ClassCompat export class DocumentLink { range: Range; @@ -1098,6 +1121,7 @@ export class DocumentLink { } } +@es5ClassCompat export class CodeLens { range: Range; @@ -1137,6 +1161,7 @@ export enum CodeActionTriggerKind { Automatic = 2, } +@es5ClassCompat export class CodeActionKind { private static readonly sep = '.'; @@ -1173,6 +1198,7 @@ export enum TextDocumentSaveReason { FocusOut = 3 } +@es5ClassCompat export class CodeAction { title: string; @@ -1225,6 +1251,7 @@ export interface FileTextEdit { metadata?: WorkspaceEditMetadata; } +@es5ClassCompat export class WorkspaceEdit implements theia.WorkspaceEdit { private _edits = new Array(); @@ -1337,6 +1364,7 @@ export class WorkspaceEdit implements theia.WorkspaceEdit { } } +@es5ClassCompat export class TreeItem { label?: string | theia.TreeItemLabel; @@ -1374,6 +1402,7 @@ export enum SymbolTag { Deprecated = 1 } +@es5ClassCompat export class SymbolInformation { static validate(candidate: SymbolInformation): void { @@ -1418,6 +1447,7 @@ export class SymbolInformation { } } +@es5ClassCompat export class DocumentSymbol { static validate(candidate: DocumentSymbol): void { @@ -1457,6 +1487,7 @@ export enum CommentThreadCollapsibleState { Expanded = 1 } +@es5ClassCompat export class QuickInputButtons { static readonly Back: theia.QuickInputButton = { iconPath: { @@ -1468,6 +1499,7 @@ export class QuickInputButtons { }; } +@es5ClassCompat export class FileDecoration { static validate(d: FileDecoration): void { @@ -1505,6 +1537,7 @@ export enum FileChangeType { Deleted = 3, } +@es5ClassCompat export class FileSystemError extends Error { static FileExists(messageOrUri?: string | URI): FileSystemError { @@ -1566,6 +1599,7 @@ export interface FileStat { readonly size: number; } +@es5ClassCompat export class ProgressOptions { /** * The location at which progress should show. @@ -1587,6 +1621,8 @@ export class ProgressOptions { this.location = location; } } + +@es5ClassCompat export class Progress { /** * Report a progress update. @@ -1612,6 +1648,7 @@ export enum ProgressLocation { Notification = 15 } +@es5ClassCompat export class ProcessExecution { private executionProcess: string; private arguments: string[]; @@ -1691,6 +1728,7 @@ export enum TaskRevealKind { Never = 3 } +@es5ClassCompat export class ShellExecution { private shellCommandLine: string; private shellCommand: string | theia.ShellQuotedString; @@ -1764,6 +1802,7 @@ export class ShellExecution { } } +@es5ClassCompat export class CustomExecution { private _callback: (resolvedDefinition: theia.TaskDefinition) => Thenable; constructor(callback: (resolvedDefinition: theia.TaskDefinition) => Thenable) { @@ -1784,6 +1823,7 @@ export class CustomExecution { } } +@es5ClassCompat export class TaskGroup { private groupId: string; @@ -1827,6 +1867,7 @@ export enum TaskScope { Workspace = 2 } +@es5ClassCompat export class Task { private taskDefinition: theia.TaskDefinition; private taskScope: theia.TaskScope.Global | theia.TaskScope.Workspace | theia.WorkspaceFolder | undefined; @@ -2012,10 +2053,12 @@ export class Task { } } +@es5ClassCompat export class Task2 extends Task { detail?: string; } +@es5ClassCompat export class DebugAdapterExecutable { /** * The command or path of the debug adapter executable. @@ -2052,6 +2095,7 @@ export class DebugAdapterExecutable { /** * Represents a debug adapter running as a socket based server. */ +@es5ClassCompat export class DebugAdapterServer { /** @@ -2086,6 +2130,7 @@ export enum LogLevel { /** * The base class of all breakpoint types. */ +@es5ClassCompat export class Breakpoint { /** * Is breakpoint enabled. @@ -2127,6 +2172,7 @@ export class Breakpoint { /** * A breakpoint specified by a source location. */ +@es5ClassCompat export class SourceBreakpoint extends Breakpoint { /** * The source and line position of this breakpoint. @@ -2145,6 +2191,7 @@ export class SourceBreakpoint extends Breakpoint { /** * A breakpoint specified by a function name. */ +@es5ClassCompat export class FunctionBreakpoint extends Breakpoint { /** * The name of the function to which this breakpoint is attached. @@ -2160,6 +2207,7 @@ export class FunctionBreakpoint extends Breakpoint { } } +@es5ClassCompat export class Color { readonly red: number; readonly green: number; @@ -2174,6 +2222,7 @@ export class Color { } } +@es5ClassCompat export class ColorInformation { range: Range; color: Color; @@ -2190,6 +2239,7 @@ export class ColorInformation { } } +@es5ClassCompat export class ColorPresentation { label: string; textEdit?: TextEdit; @@ -2209,6 +2259,7 @@ export enum ColorFormat { HSL = 2 } +@es5ClassCompat export class FoldingRange { start: number; end: number; @@ -2227,6 +2278,7 @@ export enum FoldingRangeKind { Region = 3 } +@es5ClassCompat export class SelectionRange { range: Range; @@ -2275,6 +2327,7 @@ export enum UIKind { Web = 2 } +@es5ClassCompat export class CallHierarchyItem { _sessionId?: string; _itemId?: string; @@ -2310,28 +2363,31 @@ export class CallHierarchyItem { } } +@es5ClassCompat export class CallHierarchyIncomingCall { from: theia.CallHierarchyItem; fromRanges: theia.Range[]; - constructor(item: theia.CallHierarchyItem, fromRanges: theia.Range[]) { + constructor(item: CallHierarchyItem, fromRanges: Range[]) { this.fromRanges = fromRanges; this.from = item; } } +@es5ClassCompat export class CallHierarchyOutgoingCall { to: theia.CallHierarchyItem; fromRanges: theia.Range[]; - constructor(item: theia.CallHierarchyItem, fromRanges: theia.Range[]) { + constructor(item: CallHierarchyItem, fromRanges: Range[]) { this.fromRanges = fromRanges; this.to = item; } } +@es5ClassCompat export class TimelineItem { timestamp: number; label: string; @@ -2349,6 +2405,7 @@ export class TimelineItem { // #region Semantic Coloring +@es5ClassCompat export class SemanticTokensLegend { public readonly tokenTypes: string[]; public readonly tokenModifiers: string[]; @@ -2363,6 +2420,7 @@ function isStrArrayOrUndefined(arg: any): arg is string[] | undefined { return ((typeof arg === 'undefined') || (Array.isArray(arg) && arg.every(e => typeof e === 'string'))); } +@es5ClassCompat export class SemanticTokensBuilder { private _prevLine: number; @@ -2374,7 +2432,7 @@ export class SemanticTokensBuilder { private _tokenModifierStrToInt: Map; private _hasLegend: boolean; - constructor(legend?: theia.SemanticTokensLegend) { + constructor(legend?: SemanticTokensLegend) { this._prevLine = 0; this._prevChar = 0; this._dataIsSortedAndDeltaEncoded = true; @@ -2542,6 +2600,7 @@ export class SemanticTokensBuilder { } } +@es5ClassCompat export class SemanticTokens { readonly resultId?: string; readonly data: Uint32Array; @@ -2552,6 +2611,7 @@ export class SemanticTokens { } } +@es5ClassCompat export class SemanticTokensEdit { readonly start: number; readonly deleteCount: number; @@ -2564,6 +2624,7 @@ export class SemanticTokensEdit { } } +@es5ClassCompat export class SemanticTokensEdits { readonly resultId?: string; readonly edits: SemanticTokensEdit[]; diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx b/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx index 772067f8d2c49..a039597c26e13 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx +++ b/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx @@ -1074,7 +1074,7 @@ export class SearchInWorkspaceResultTreeWidget extends TreeWidget { protected getExcludeGlobs(excludeOptions?: string[]): string[] { const excludePreferences = this.filesystemPreferences['files.exclude']; const excludePreferencesGlobs = Object.keys(excludePreferences).filter(key => !!excludePreferences[key]); - return [...new Set([...excludePreferencesGlobs, ...excludeOptions])]; + return [...new Set([...excludePreferencesGlobs, ...excludeOptions || []])]; } /** diff --git a/packages/task/src/browser/task-problem-matcher-registry.ts b/packages/task/src/browser/task-problem-matcher-registry.ts index 9c84a27067ae5..78d5fb5c09355 100644 --- a/packages/task/src/browser/task-problem-matcher-registry.ts +++ b/packages/task/src/browser/task-problem-matcher-registry.ts @@ -144,7 +144,11 @@ export class ProblemMatcherRegistry { patterns.push(ProblemPattern.fromProblemPatternContribution(matcher.pattern)); } } else if (baseMatcher) { - patterns.push(...baseMatcher.pattern); + if (Array.isArray(baseMatcher.pattern)) { + patterns.push(...baseMatcher.pattern); + } else { + patterns.push(baseMatcher.pattern); + } } let deprecated: boolean | undefined = matcher.deprecated; diff --git a/packages/workspace/src/browser/workspace-uri-contribution.spec.ts b/packages/workspace/src/browser/workspace-uri-contribution.spec.ts index 22b524d2e4cd4..46661f03372af 100644 --- a/packages/workspace/src/browser/workspace-uri-contribution.spec.ts +++ b/packages/workspace/src/browser/workspace-uri-contribution.spec.ts @@ -46,7 +46,7 @@ beforeEach(() => { container = new Container(); container.bind(ApplicationShell).toConstantValue({ currentChanged: new Signal({}), - widgets: () => [] + widgets: [] // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); container.bind(WidgetManager).toConstantValue({