Skip to content

Commit 24f4576

Browse files
committed
Add type for data.meta on elements to hast
1 parent feeec02 commit 24f4576

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

index.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ export interface RawData extends Data {}
3737

3838
// Register nodes in content.
3939
declare module 'hast' {
40+
interface ElementData {
41+
/**
42+
* Custom info relating to the node, if `<code>` in `<pre>`.
43+
*
44+
* Defined by `mdast-util-to-hast` (`remark-rehype`).
45+
*/
46+
meta?: string | null | undefined
47+
}
48+
4049
interface ElementContentMap {
4150
/**
4251
* Raw string of HTML embedded into HTML AST.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"**/*.ts"
102102
],
103103
"rules": {
104+
"@typescript-eslint/ban-types": "off",
104105
"@typescript-eslint/consistent-type-definitions": "off"
105106
}
106107
}

0 commit comments

Comments
 (0)