-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
With TypeScript components, the metadata.json file is not generated correctly in cases where there is a union with a boolean.
For example,
persistence?: boolean | string | number;
The metadata.json file only includes the string and number but not the boolean.
"persistence": {
"description": "Used to allow user interactions in this component to be persisted when\nthe component - or the page - is refreshed. If `persisted` is truthy and\nhasn't changed from its previous value, a `value` that the user has\nchanged while using the app will keep that change, as long as\nthe new `value` also matches what was given originally.\nUsed in conjunction with `persistence_type`.",
"required": false,
"type": {
"name": "union",
"value": [
{
"name": "string",
"raw": "string"
},
{
"name": "number",
"raw": "number"
}
],
"raw": "string | number | boolean"
}
},
The docstrings are not generated correctly:
Also, setting the persistence=True on the component generates this warning in the console:
AlbinLind

