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

why need | string in the properties like display #80

Closed
xwchris opened this issue Nov 14, 2019 · 1 comment
Closed

why need | string in the properties like display #80

xwchris opened this issue Nov 14, 2019 · 1 comment

Comments

@xwchris
Copy link

xwchris commented Nov 14, 2019

In the source code, I found the property display's type like this

type DisplayProperty = Globals | DisplayOutside | DisplayInside | DisplayInternal | DisplayLegacy | "contents" | "list-item" | "none" | string;

the result of DisplayProperty is string because of the | string. As a result of this, I can't have a autocompletion in ts.

So why need | string in the properties like display?

@frenic
Copy link
Owner

frenic commented Nov 14, 2019

As mentioned here #8 (comment) the syntax for display tells us that you're able to use space separated values. That's why union string is needed. But the autocomplete however seems to be solved in #74. So it will hopefully work in v3 that will be released soon.

@frenic frenic closed this as completed Nov 14, 2019
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