Add "// @ts-check" to top of new micromark-related modules, fix import typo.

This commit is contained in:
David Anson 2023-01-12 21:20:54 -08:00
parent 7142bbd8ed
commit 000281e2f0
3 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,5 @@
// @ts-check
import assert from "node:assert/strict";
// eslint-disable-next-line n/no-unpublished-import
import { parse, postprocess, preprocess } from "../micromark/exports.mjs";
@ -64,6 +66,7 @@ function micromarkParse(markdown) {
assert.equal(endLine, current.endLine);
assert.equal(endColumn, current.endColumn);
assert.equal(text, current.text);
// @ts-ignore
current = history.pop();
assert.ok(current, "Empty history");
}

View file

@ -1,3 +1,5 @@
// @ts-check
/* eslint-disable n/file-extension-in-import */
export { parse } from "micromark/lib/parse";

View file

@ -1,6 +1,8 @@
// @ts-check
import fs from "node:fs/promises";
import test from "ava";
import newLineRe from "../helpers/helpers.js";
import { newLineRe } from "../helpers/helpers.js";
import { parse } from "../lib/micromark.mjs";
test("parse", async(t) => {