Skip to content

How to handle type of Element.Properties? #72

Answered by wooorm
plastic041 asked this question in Q&A
Discussion options

You must be logged in to vote

If you type tree as a hast.Root, everything becomes typed.

properties should always be Properties, not undefined. However, people sometimes forget to add it in their plugins. That’s why it’s recommended to use an if check to make sure it exists

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@plastic041
Comment options

@wooorm
Comment options

@plastic041
Comment options

@wooorm
Comment options

@plastic041
Comment options

Answer selected by wooorm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants