Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make types of various raws properties consistent #1794

Open
jathak opened this issue Nov 18, 2022 · 1 comment
Open

Make types of various raws properties consistent #1794

jathak opened this issue Nov 18, 2022 · 1 comment

Comments

@jathak
Copy link

jathak commented Nov 18, 2022

Different types of nodes specify different (mostly optional) properties on raws. If there's truly nothing that can be guaranteed about raws, it probably makes more sense to just have all node types use any, but if not, it probably makes sense to have a common interface defining each property that the default CSS parser uses.

@ai
Copy link
Member

ai commented Nov 18, 2022

  1. Yes, any raws.x can be missed.
  2. Non-standard parsers can add own raws.x
  3. But I want to keep some docs (in a way of types) for raws which you can expect.

If there's truly nothing that can be guaranteed about raws, it probably makes more sense to just have all node types use any

Why raws: Record<string, string> will be better than current types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants