Add returning data type of matter #183
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello! firstly, I am really appreciate for your commitment. I have a suggestion for adding a new return type for the method
matter.Background
I am using
gray-matterto parse markdown files for my blog posts like below.I found the type assertion feels queit guilty to rely on these manual assertions.
Suggestion
So I suggest a additional Generic paramter
Dwhich representsDatato explicitly define the shape of their frontmatter data, providing better type safety and a much smoother development experience.Example
This would support better DX with auto completion and fully backward compatible.