You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only fixed set of types are exposed but it doesn't really describe the actual file's front matter. Ideally, these front matter properties are available to use after compilation. Right now, they need to be manually typed by the user so any changes or updates to the front matter needs to be updated to the type as well, which is nice strictly speaking, but not ideal as this should generally be dynamic.
The general idea is to
Generate .d.ts from JSON object, straight from the return value of compile and traverse, which means a separate function. Or even inside of them, passed as an option.
Place generated *.d.ts in a locally cached folder (needs to be gitignored), or inside node_modules (if it's possible) and somehow make TypeScript aware of it and correctly captures the types in relation to the directory path, or just make them globally available to be imported
The text was updated successfully, but these errors were encountered:
Only fixed set of types are exposed but it doesn't really describe the actual file's front matter. Ideally, these front matter properties are available to use after compilation. Right now, they need to be manually typed by the user so any changes or updates to the front matter needs to be updated to the type as well, which is nice strictly speaking, but not ideal as this should generally be dynamic.
The general idea is to
.d.ts
from JSON object, straight from the return value ofcompile
andtraverse
, which means a separate function. Or even inside of them, passed as an option.*.d.ts
in a locally cached folder (needs to be gitignored), or insidenode_modules
(if it's possible) and somehow make TypeScript aware of it and correctly captures the types in relation to the directory path, or just make them globally available to be importedThe text was updated successfully, but these errors were encountered: