misc: enable noImplicitOverride and noPropertyAccessFromIndexSignature in tsconfig

This commit is contained in:
Grégoire Geis 2022-02-07 13:27:41 +01:00
parent 925f173491
commit 55dde9df8d
16 changed files with 78 additions and 76 deletions

View File

@ -500,7 +500,7 @@ function getCommands(module: Omit<Builder.ParsedModule, "commands">) {
*/
function getKeybindings(module: Omit<Builder.ParsedModule, "keybindings">) {
return [
...module.functions.flatMap((f) => parseKeys(f.properties.keys ?? "").map((key) => ({
...module.functions.flatMap((f) => parseKeys(f.properties["keys"] ?? "").map((key) => ({
...key,
title: f.summary,
command: `dance.${f.qualifiedName}`,

View File

@ -133,7 +133,7 @@ export const pkg = (modules: Builder.ParsedModule[]) => ({
"source-map-support": "^0.5.19",
"ts-loader": "^9.2.5",
"ts-node": "^9.1.1",
"typescript": "^4.2.4",
"typescript": "^4.5.5",
"unexpected": "^12.0.0",
"vsce": "^1.99.0",
"vscode-test": "^1.5.2",

2
package.json generated
View File

@ -45,7 +45,7 @@
"source-map-support": "^0.5.19",
"ts-loader": "^9.2.5",
"ts-node": "^9.1.1",
"typescript": "^4.2.4",
"typescript": "^4.5.5",
"unexpected": "^12.0.0",
"vsce": "^1.99.0",
"vscode-test": "^1.5.2",

View File

@ -233,7 +233,7 @@ export class Context extends ContextWithoutActiveEditor {
* of an execution context or if the execution context does not have an
* active editor.
*/
public static get current() {
public static override get current() {
if (!(currentContext instanceof Context)) {
throw new Error("current context does not have an active text editor");
}
@ -246,7 +246,7 @@ export class Context extends ContextWithoutActiveEditor {
* an execution context or if the execution context does not have an active
* editor.
*/
public static get currentOrUndefined() {
public static override get currentOrUndefined() {
if (currentContext === undefined || !(currentContext instanceof Context)) {
return undefined;
}
@ -386,7 +386,7 @@ export class Context extends ContextWithoutActiveEditor {
* Returns a new context whose cancellation is controlled by the specified
* cancellation token.
*/
public withCancellationToken(cancellationToken: vscode.CancellationToken) {
public override withCancellationToken(cancellationToken: vscode.CancellationToken) {
return new Context(this.getState(), cancellationToken, this.commandDescriptor);
}

View File

@ -423,7 +423,7 @@ function getShell() {
const config = vscode.workspace.getConfiguration("terminal");
return config.get<string | null>(`integrated.automationShell.${os}`)
?? process.env.SHELL
?? process.env["SHELL"]
?? undefined;
}

View File

@ -28,7 +28,7 @@ export async function build(builder: Builder) {
? ""
: "This command:" + supportedInputs.map((x) => `\n- ${x}.`).join("") + "\n";
})()}
${"keys" in f.properties ? `Default keybinding: ${f.properties.keys}\n` : ""}
${"keys" in f.properties ? `Default keybinding: ${f.properties["keys"]}\n` : ""}
`).trim()).join("\n\n")}
`).trim()).join("\n\n")}
`);
@ -56,7 +56,7 @@ function toTable(modules: readonly Builder.ParsedModule[]) {
return allCommands.map((f, i, { length }) => {
const identifier = "name" in f ? modulePrefix + f.nameWithDot : f.qualifiedIdentifier,
summary = "summary" in f ? f.summary : f.title,
keys = parseKeys(("properties" in f ? f.properties.keys : f.keys) ?? ""),
keys = parseKeys(("properties" in f ? f.properties["keys"] : f.keys) ?? ""),
link = "name" in f
? `#${modulePrefix + f.nameWithDot}`
: `./${module.name}.ts#L${f.line + 1}`;

View File

@ -103,13 +103,13 @@ export class CommandDescriptor<Flags extends CommandDescriptor.Flags = CommandDe
const ownedArgument = Object.assign({}, argument) as Record<string, unknown>;
if (ownedArgument.count === undefined && extension.currentCount !== 0) {
ownedArgument.count = extension.currentCount;
if (ownedArgument["count"] === undefined && extension.currentCount !== 0) {
ownedArgument["count"] = extension.currentCount;
}
if (ownedArgument.register === undefined && extension.currentRegister !== undefined) {
ownedArgument.register = extension.currentRegister;
if (ownedArgument["register"] === undefined && extension.currentRegister !== undefined) {
ownedArgument["register"] = extension.currentRegister;
}
if (ownedArgument.record === false) {
if (ownedArgument["record"] === false) {
context.doNotRecord();
}

View File

@ -162,7 +162,7 @@ function determineFunctionExpression(f: Builder.ParsedFunction) {
givenParameters.push("_");
} else if (type.startsWith("Argument<")) {
takeArgument = true;
givenParameters.push("argument." + name);
givenParameters.push("argument[" + JSON.stringify(name) + "]");
} else {
throw new Error(`unknown parameter ${JSON.stringify([name, type])}`);
}

View File

@ -157,7 +157,7 @@ async function loadDevModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.dev.setSelectionBehavior",
(_, argument) => _.runAsync((_) => setSelectionBehavior(_, _.extension, argument.mode, argument.value)),
(_, argument) => _.runAsync((_) => setSelectionBehavior(_, _.extension, argument["mode"], argument["value"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
];
@ -188,7 +188,7 @@ async function loadEditModule(): Promise<CommandDescriptor[]> {
return [
new CommandDescriptor(
"dance.edit.align",
(_, argument) => _.runAsync((_) => align(_, _.selections, argument.fill)),
(_, argument) => _.runAsync((_) => align(_, _.selections, argument["fill"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -233,27 +233,27 @@ async function loadEditModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.edit.insert",
(_, argument) => _.runAsync((_) => insert(_, _.selections, getRegister(_, argument, "dquote", Register.Flags.CanRead), argument.adjust, argument.handleNewLine, getRepetitions(_, argument), argument.select, getShift(argument), argument.text, argument.where)),
(_, argument) => _.runAsync((_) => insert(_, _.selections, getRegister(_, argument, "dquote", Register.Flags.CanRead), argument["adjust"], argument["handleNewLine"], getRepetitions(_, argument), argument["select"], getShift(argument), argument["text"], argument["where"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.edit.join",
(_, argument) => _.runAsync((_) => join(_, argument.separator)),
(_, argument) => _.runAsync((_) => join(_, argument["separator"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.edit.join.select",
(_, argument) => _.runAsync((_) => join_select(_, argument.separator)),
(_, argument) => _.runAsync((_) => join_select(_, argument["separator"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.edit.newLine.above",
(_, argument) => _.runAsync((_) => newLine_above(_, getRepetitions(_, argument), argument.select, getShift(argument))),
(_, argument) => _.runAsync((_) => newLine_above(_, getRepetitions(_, argument), argument["select"], getShift(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.edit.newLine.below",
(_, argument) => _.runAsync((_) => newLine_below(_, getRepetitions(_, argument), argument.select, getShift(argument))),
(_, argument) => _.runAsync((_) => newLine_below(_, getRepetitions(_, argument), argument["select"], getShift(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -368,7 +368,7 @@ async function loadHistoryModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.history.repeat",
(_, argument) => _.runAsync((_) => repeat(_, getRepetitions(_, argument), argument.include)),
(_, argument) => _.runAsync((_) => repeat(_, getRepetitions(_, argument), argument["include"])),
CommandDescriptor.Flags.RequiresActiveEditor | CommandDescriptor.Flags.DoNotReplay,
),
new CommandDescriptor(
@ -439,7 +439,7 @@ async function loadMiscModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.changeInput",
(_, argument) => _.runAsync((_) => changeInput(argument.action)),
(_, argument) => _.runAsync((_) => changeInput(argument["action"])),
CommandDescriptor.Flags.DoNotReplay,
),
new CommandDescriptor(
@ -449,12 +449,12 @@ async function loadMiscModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.openMenu",
(_, argument) => _.runAsync((_) => openMenu(_, getInputOr(argument), argument.menu, argument.prefix, argument.pass, argument.locked, argument.delay, argument.title)),
(_, argument) => _.runAsync((_) => openMenu(_, getInputOr(argument), argument["menu"], argument["prefix"], argument["pass"], argument["locked"], argument["delay"], argument["title"])),
CommandDescriptor.Flags.DoNotReplay,
),
new CommandDescriptor(
"dance.run",
(_, argument) => _.runAsync((_) => run(_, getInput(argument), getInputOr(argument), getCount(_, argument), getRepetitions(_, argument), getRegister(_, argument, "null", Register.Flags.None), argument.commands)),
(_, argument) => _.runAsync((_) => run(_, getInput(argument), getInputOr(argument), getCount(_, argument), getRepetitions(_, argument), getRegister(_, argument, "null", Register.Flags.None), argument["commands"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -464,12 +464,12 @@ async function loadMiscModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.updateCount",
(_, argument) => _.runAsync((_) => updateCount(_, getCount(_, argument), _.extension, getInputOr(argument), argument.addDigits)),
(_, argument) => _.runAsync((_) => updateCount(_, getCount(_, argument), _.extension, getInputOr(argument), argument["addDigits"])),
CommandDescriptor.Flags.RequiresActiveEditor | CommandDescriptor.Flags.DoNotReplay,
),
new CommandDescriptor(
"dance.updateRegister",
(_, argument) => _.runAsync((_) => updateRegister(_, getRegister(_, argument, "dquote", Register.Flags.CanWrite), argument.copyFrom, getInputOr(argument))),
(_, argument) => _.runAsync((_) => updateRegister(_, getRegister(_, argument, "dquote", Register.Flags.CanWrite), argument["copyFrom"], getInputOr(argument))),
CommandDescriptor.Flags.RequiresActiveEditor | CommandDescriptor.Flags.DoNotReplay,
),
];
@ -551,17 +551,17 @@ async function loadSearchModule(): Promise<CommandDescriptor[]> {
return [
new CommandDescriptor(
"dance.search",
(_, argument) => _.runAsync((_) => search(_, getRegister<[Register.Flags.CanRead, Register.Flags.CanWrite]>(_, argument, "slash", Register.Flags.CanRead | Register.Flags.CanWrite), getRepetitions(_, argument), argument.add, getDirection(argument), argument.interactive, getShift(argument), getInput(argument), getSetInput(argument))),
(_, argument) => _.runAsync((_) => search(_, getRegister<[Register.Flags.CanRead, Register.Flags.CanWrite]>(_, argument, "slash", Register.Flags.CanRead | Register.Flags.CanWrite), getRepetitions(_, argument), argument["add"], getDirection(argument), argument["interactive"], getShift(argument), getInput(argument), getSetInput(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.search.next",
(_, argument) => _.runAsync((_) => next(_, _.document, getRegister(_, argument, "slash", Register.Flags.CanRead), getRepetitions(_, argument), argument.add, getDirection(argument))),
(_, argument) => _.runAsync((_) => next(_, _.document, getRegister(_, argument, "slash", Register.Flags.CanRead), getRepetitions(_, argument), argument["add"], getDirection(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.search.selection",
(_, argument) => _.runAsync((_) => selection(_.document, _.selections, getRegister(_, argument, "slash", Register.Flags.CanWrite), argument.smart)),
(_, argument) => _.runAsync((_) => selection(_.document, _.selections, getRegister(_, argument, "slash", Register.Flags.CanWrite), argument["smart"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -616,22 +616,22 @@ async function loadSeekModule(): Promise<CommandDescriptor[]> {
return [
new CommandDescriptor(
"dance.seek",
(_, argument) => _.runAsync((_) => seek(_, getInputOr(argument), getRepetitions(_, argument), getDirection(argument), getShift(argument), argument.include)),
(_, argument) => _.runAsync((_) => seek(_, getInputOr(argument), getRepetitions(_, argument), getDirection(argument), getShift(argument), argument["include"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.seek.enclosing",
(_, argument) => _.runAsync((_) => enclosing(_, getDirection(argument), getShift(argument), argument.open, argument.pairs)),
(_, argument) => _.runAsync((_) => enclosing(_, getDirection(argument), getShift(argument), argument["open"], argument["pairs"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.seek.object",
(_, argument) => _.runAsync((_) => object(_, getInputOr(argument), argument.inner, argument.where, getShift(argument))),
(_, argument) => _.runAsync((_) => object(_, getInputOr(argument), argument["inner"], argument["where"], getShift(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.seek.word",
(_, argument) => _.runAsync((_) => word(_, getRepetitions(_, argument), argument.stopAtEnd, argument.ws, getDirection(argument), getShift(argument))),
(_, argument) => _.runAsync((_) => word(_, getRepetitions(_, argument), argument["stopAtEnd"], argument["ws"], getDirection(argument), getShift(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -826,7 +826,7 @@ async function loadSelectModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.select.horizontally",
(_, argument) => _.runAsync((_) => horizontally(_, argument.avoidEol, getRepetitions(_, argument), getDirection(argument), getShift(argument))),
(_, argument) => _.runAsync((_) => horizontally(_, argument["avoidEol"], getRepetitions(_, argument), getDirection(argument), getShift(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -861,12 +861,12 @@ async function loadSelectModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.select.lineEnd",
(_, argument) => _.runAsync((_) => lineEnd(_, getCount(_, argument), getShift(argument), argument.lineBreak)),
(_, argument) => _.runAsync((_) => lineEnd(_, getCount(_, argument), getShift(argument), argument["lineBreak"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.select.lineStart",
(_, argument) => _.runAsync((_) => lineStart(_, getCount(_, argument), getShift(argument), argument.skipBlank)),
(_, argument) => _.runAsync((_) => lineStart(_, getCount(_, argument), getShift(argument), argument["skipBlank"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -881,7 +881,7 @@ async function loadSelectModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.select.vertically",
(_, argument) => _.runAsync((_) => vertically(_, _.selections, argument.avoidEol, getRepetitions(_, argument), getDirection(argument), getShift(argument), argument.by)),
(_, argument) => _.runAsync((_) => vertically(_, _.selections, argument["avoidEol"], getRepetitions(_, argument), getDirection(argument), getShift(argument), argument["by"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1065,7 +1065,7 @@ async function loadSelectionsModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.selections.filter",
(_, argument) => _.runAsync((_) => filter(_, getInput(argument), getSetInput(argument), argument.defaultInput, argument.inverse, argument.interactive, getCount(_, argument))),
(_, argument) => _.runAsync((_) => filter(_, getInput(argument), getSetInput(argument), argument["defaultInput"], argument["inverse"], argument["interactive"], getCount(_, argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1085,7 +1085,7 @@ async function loadSelectionsModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.selections.reduce",
(_, argument) => _.runAsync((_) => reduce(_, argument.where, argument.empty)),
(_, argument) => _.runAsync((_) => reduce(_, argument["where"], argument["empty"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1095,12 +1095,12 @@ async function loadSelectionsModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.selections.restore.withCurrent",
(_, argument) => _.runAsync((_) => restore_withCurrent(_, _.document, getRegister(_, argument, "caret", Register.Flags.CanReadSelections), argument.reverse, argument.action)),
(_, argument) => _.runAsync((_) => restore_withCurrent(_, _.document, getRegister(_, argument, "caret", Register.Flags.CanReadSelections), argument["reverse"], argument["action"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.save",
(_, argument) => _.runAsync((_) => save(_, _.document, _.selections, getRegister(_, argument, "caret", Register.Flags.CanWriteSelections), argument.style, argument.until, argument.untilDelay)),
(_, argument) => _.runAsync((_) => save(_, _.document, _.selections, getRegister(_, argument, "caret", Register.Flags.CanWriteSelections), argument["style"], argument["until"], argument["untilDelay"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1110,22 +1110,22 @@ async function loadSelectionsModule(): Promise<CommandDescriptor[]> {
),
new CommandDescriptor(
"dance.selections.select",
(_, argument) => _.runAsync((_) => select(_, argument.interactive, getInput(argument), getSetInput(argument))),
(_, argument) => _.runAsync((_) => select(_, argument["interactive"], getInput(argument), getSetInput(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.split",
(_, argument) => _.runAsync((_) => split(_, argument.excludeEmpty, argument.interactive, getInput(argument), getSetInput(argument))),
(_, argument) => _.runAsync((_) => split(_, argument["excludeEmpty"], argument["interactive"], getInput(argument), getSetInput(argument))),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.splitLines",
(_, argument) => _.runAsync((_) => splitLines(_, _.document, _.selections, getRepetitions(_, argument), argument.excludeEol)),
(_, argument) => _.runAsync((_) => splitLines(_, _.document, _.selections, getRepetitions(_, argument), argument["excludeEol"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.toggleIndices",
(_, argument) => _.runAsync((_) => toggleIndices(_, argument.display, argument.until)),
(_, argument) => _.runAsync((_) => toggleIndices(_, argument["display"], argument["until"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1219,17 +1219,17 @@ async function loadSelectionsRotateModule(): Promise<CommandDescriptor[]> {
return [
new CommandDescriptor(
"dance.selections.rotate.both",
(_, argument) => _.runAsync((_) => both(_, getRepetitions(_, argument), argument.reverse)),
(_, argument) => _.runAsync((_) => both(_, getRepetitions(_, argument), argument["reverse"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.rotate.contents",
(_, argument) => _.runAsync((_) => contents(_, getRepetitions(_, argument), argument.reverse)),
(_, argument) => _.runAsync((_) => contents(_, getRepetitions(_, argument), argument["reverse"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
"dance.selections.rotate.selections",
(_, argument) => _.runAsync((_) => selections(_, getRepetitions(_, argument), argument.reverse)),
(_, argument) => _.runAsync((_) => selections(_, getRepetitions(_, argument), argument["reverse"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
new CommandDescriptor(
@ -1261,7 +1261,7 @@ async function loadViewModule(): Promise<CommandDescriptor[]> {
return [
new CommandDescriptor(
"dance.view.line",
(_, argument) => _.runAsync((_) => line(_, argument.at)),
(_, argument) => _.runAsync((_) => line(_, argument["at"])),
CommandDescriptor.Flags.RequiresActiveEditor,
),
];

View File

@ -415,10 +415,10 @@ export async function object(
const match = m[2];
if ("before" in match.groups!) {
start += match.groups.before.length;
start += match.groups["before"].length;
}
if ("after" in match.groups!) {
end -= match.groups.after.length;
end -= match.groups["after"].length;
}
}

View File

@ -180,18 +180,18 @@ export class AutoDisposable implements vscode.Disposable {
case AutoDisposable.EventType.OnModeDidChange:
const except = [] as string[];
if (Array.isArray(eventOpts.except)) {
except.push(...eventOpts.except);
} else if (typeof eventOpts.except === "string") {
except.push(eventOpts.except);
if (Array.isArray(eventOpts["except"])) {
except.push(...eventOpts["except"]);
} else if (typeof eventOpts["except"] === "string") {
except.push(eventOpts["except"]);
}
const include = [] as string[];
if (Array.isArray(eventOpts.include)) {
include.push(...eventOpts.include);
} else if (typeof eventOpts.include === "string") {
include.push(eventOpts.include);
if (Array.isArray(eventOpts["include"])) {
include.push(...eventOpts["include"]);
} else if (typeof eventOpts["include"] === "string") {
include.push(eventOpts["include"]);
}
editorState.extension.editors.onModeDidChange((e) => {

View File

@ -536,7 +536,7 @@ export class Group extends Disjunction<Group | NumericEscape | Backreference> {
super(alternatives);
}
protected prefix() {
protected override prefix() {
if (this.name !== undefined) {
return "(?<" + this.name + ">";
}
@ -863,7 +863,7 @@ export class Lookaround extends Disjunction<Lookaround> {
super(alternatives);
}
protected prefix() {
protected override prefix() {
return "(?" + (this.isLookbehind ? "<" : "") + (this.isNegative ? "!" : "=");
}
@ -1016,11 +1016,11 @@ export class Expression extends Disjunction<Expression> {
super(alternatives);
}
protected prefix() {
protected override prefix() {
return "";
}
protected suffix() {
protected override suffix() {
return "";
}

View File

@ -293,7 +293,7 @@ export class StyledSet extends Set {
this._updateDecorations();
}
public addArray(selections: Array) {
public override addArray(selections: Array) {
super.addArray(selections);
for (let i = 0, len = selections.length; i < len; i += 2) {
@ -306,7 +306,7 @@ export class StyledSet extends Set {
return this;
}
protected updateAfterDocumentChanged(e: vscode.TextDocumentChangeEvent) {
protected override updateAfterDocumentChanged(e: vscode.TextDocumentChangeEvent) {
if (!super.updateAfterDocumentChanged(e)) {
return false;
}
@ -316,7 +316,7 @@ export class StyledSet extends Set {
return true;
}
public dispose() {
public override dispose() {
super.dispose();
this._decorationType.dispose();

View File

@ -5,16 +5,16 @@ import { promises as fs } from "fs";
export async function run(testsRoot: string) {
// Create the mocha test.
const currentFile = (process.env.CURRENT_FILE ?? "").replace(/\\/g, "/"),
currentLine = process.env.CURRENT_LINE ? +process.env.CURRENT_LINE - 1 : undefined,
const currentFile = (process.env["CURRENT_FILE"] ?? "").replace(/\\/g, "/"),
currentLine = process.env["CURRENT_LINE"] ? +process.env["CURRENT_LINE"] - 1 : undefined,
rootPath = path.join(__dirname, "../../.."),
mocha = new Mocha({ ui: "tdd", color: true, timeout: 0 });
if (process.env.MOCHA_REPORTER) {
if (process.env["MOCHA_REPORTER"]) {
// Note: most reporters do not work due to
// https://github.com/microsoft/vscode/issues/56211. Here, using a faulty
// reporter is not necessarily bad; we can do this to avoid writing results.
mocha.reporter(process.env.MOCHA_REPORTER);
mocha.reporter(process.env["MOCHA_REPORTER"]);
}
let files = await new Promise<readonly string[]>((resolve, reject) => {

View File

@ -7,6 +7,8 @@
"sourceMap": true,
"strict": true,
"noImplicitReturns": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"preserveConstEnums": true,
},
"exclude": ["node_modules", ".vscode-test", "src/commands/old-*.ts"],

View File

@ -3066,10 +3066,10 @@ typed-rest-client@^1.8.4:
tunnel "0.0.6"
underscore "^1.12.1"
typescript@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
typescript@^4.5.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"