additional properties for attributes#52
additional properties for attributes#52jogibear9988 wants to merge 1 commit intowebcomponents:mainfrom
Conversation
| * If Type is numeric and has a maximum constraint. | ||
| */ | ||
| max?: string; | ||
|
|
There was a problem hiding this comment.
In that case that you had these values by default, would they not likely be defined by the type? e.g.
type AllowedStrings = 'one of' | 'two of' | 'three of';
// ....
public myProp: AllowedStrings = 'one of';
Etc?
There was a problem hiding this comment.
I don't get what you mean. What is if the type is "numeric" and max is 9999. Would you list all values?
There was a problem hiding this comment.
Seems like maybe this is both “state of the art” and a little early, but possibly the approach that would make sense. microsoft/TypeScript#43505 Would have thought there’d already be types for this, but without the min/max makes more sense.
There was a problem hiding this comment.
What is if it's a number enum? as I said in #51
The combined type 1 | 2 | 3 would not help much.
You would know wich values are valid, but no meaning behind them.
|
Is there an issue where this feature was discussed yet? Lets start features in issues. |
|
@justinfagnani we started this discussion partly in #51 |
No description provided.