refactor: improve type safety (#155)

* Fix to make it type safe.

* The build is failing, fix it.
This commit is contained in:
Katsuyuki Karasawa
2024-08-28 01:19:26 +09:00
committed by GitHub
parent f79ee3482d
commit e9c8930559
10 changed files with 489 additions and 133 deletions

View File

@@ -4,7 +4,7 @@ import { visit } from 'unist-util-visit'
export function parseDirectiveNode() {
return (tree, { data }) => {
visit(tree, function (node) {
visit(tree, node => {
if (
node.type === 'containerDirective' ||
node.type === 'leafDirective' ||