diff --git a/src/bin/bolt-selftest.ts b/src/bin/bolt-selftest.ts index 9ad56981f..b67482ae1 100644 --- a/src/bin/bolt-selftest.ts +++ b/src/bin/bolt-selftest.ts @@ -9,9 +9,7 @@ import path from "path"; import yargs from "yargs"; import { Checker } from "../checker"; import { TextFile } from "../cst"; -import { Parser } from "../parser"; -import { Punctuator, Scanner } from "../scanner"; -import { ConsoleDiagnostics, DiagnosticStore } from "../diagnostics"; +import { ConsoleDiagnostics } from "../diagnostics"; import { parseSourceFile } from ".."; const projectDir = path.resolve(__dirname, '..', '..'); @@ -40,12 +38,12 @@ yargs async function* loadTests(): AsyncIterable { for (const filename of globSync(path.join(projectDir, 'src', 'test', '**', '*.md'))) { const text = await fs.promises.readFile(filename, 'utf-8'); - const reader = commonmark.Parser(); + const reader = new commonmark.Parser(); const root = reader.parse(text); let child = root.firstChild; while (child !== null) { if (child.type === 'code_block') { - yield { code: child.literal }; + yield { code: child.literal! }; } child = child.next; }