Skip to content

Commit

Permalink
Fix internal types for changes in @types/unist
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 15, 2021
1 parent 6fc8d8e commit 6cc6c8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions script/build-table.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('mdast').TableRow} TableRow
*/

import {headingRange} from 'mdast-util-heading-range'
import {u} from 'unist-builder'
import {patterns} from '../lib/en.js'

/** @type {import('unified').Plugin<[]>} */
/** @type {import('unified').Plugin<[], Root>} */
export default function table() {
return (tree) => {
headingRange(tree, 'list of rules', (start, _, end) => {
/** @type {import('mdast').TableRow[]} */
/** @type {TableRow[]} */
const rows = [
u('tableRow', [
u('tableCell', [u('text', 'id')]),
Expand Down

0 comments on commit 6cc6c8e

Please sign in to comment.