Data
Info associated with hast nodes by the ecosystem.
This space is guaranteed to never be specified by unist or hast. But you can use it in utilities and plugins to store data.
This type can be augmented to register custom data. For example:
declare module 'hast' {
interface Data {
// `someNode.data.myId` is typed as `number | undefined`
myId?: number | undefined
}
}
interface Data extends UnistData {}