This commit upgrades TypeScript to the latest version 5.3 and introduces `verbatimModuleSyntax` in line with the official Vue guide recommendatinos (vuejs/docs#2592). By enforcing `import type` for type-only imports, this commit improves code clarity and supports tooling optimization, ensuring imports are only bundled when necessary for runtime. Changes: - Bump TypeScript to 5.3.3 across the project. - Adjust import statements to utilize `import type` where applicable, promoting cleaner and more efficient code.
58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
import { OperatingSystem } from '@/domain/OperatingSystem';
|
|
import type { Logger } from '@/application/Common/Log/Logger';
|
|
import type { WindowVariables } from '@/infrastructure/WindowVariables/WindowVariables';
|
|
import type { CodeRunner } from '@/application/CodeRunner/CodeRunner';
|
|
import type { Dialog } from '@/presentation/common/Dialog';
|
|
import type { ScriptDiagnosticsCollector } from '@/application/ScriptDiagnostics/ScriptDiagnosticsCollector';
|
|
import { LoggerStub } from './LoggerStub';
|
|
import { CodeRunnerStub } from './CodeRunnerStub';
|
|
import { DialogStub } from './DialogStub';
|
|
import { ScriptDiagnosticsCollectorStub } from './ScriptDiagnosticsCollectorStub';
|
|
|
|
export class WindowVariablesStub implements WindowVariables {
|
|
public codeRunner?: CodeRunner = new CodeRunnerStub();
|
|
|
|
public isRunningAsDesktopApplication: true | undefined = true;
|
|
|
|
public os?: OperatingSystem = OperatingSystem.BlackBerryOS;
|
|
|
|
public log?: Logger = new LoggerStub();
|
|
|
|
public dialog?: Dialog = new DialogStub();
|
|
|
|
public scriptDiagnosticsCollector?
|
|
: ScriptDiagnosticsCollector = new ScriptDiagnosticsCollectorStub();
|
|
|
|
public withScriptDiagnosticsCollector(
|
|
scriptDiagnosticsCollector: ScriptDiagnosticsCollector,
|
|
): this {
|
|
this.scriptDiagnosticsCollector = scriptDiagnosticsCollector;
|
|
return this;
|
|
}
|
|
|
|
public withLog(log: Logger): this {
|
|
this.log = log;
|
|
return this;
|
|
}
|
|
|
|
public withDialog(dialog: Dialog): this {
|
|
this.dialog = dialog;
|
|
return this;
|
|
}
|
|
|
|
public withIsRunningAsDesktopApplication(isRunningAsDesktopApplication: true | undefined): this {
|
|
this.isRunningAsDesktopApplication = isRunningAsDesktopApplication;
|
|
return this;
|
|
}
|
|
|
|
public withOs(value: OperatingSystem | undefined): this {
|
|
this.os = value;
|
|
return this;
|
|
}
|
|
|
|
public withCodeRunner(value?: CodeRunner): this {
|
|
this.codeRunner = value;
|
|
return this;
|
|
}
|
|
}
|