You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDE: complete and validate the data object in $component() callback #113
When I was recording a demo, I noticed that the data obj in component's JS' $component callback was NOT typed by the LSP. It should be.
Minimal reproduction
classExamples(Component):
# NOTE: This behavior should be checked with both `js_data` and explicit `JsData`defjs_data(self, kwargs, slots):
return {
"a": "str",
"b": 1,
}
js=""" $component(({ data }) => { // BUG - Writing `data.` should offer `data.a` and `data.b` // as autocomplete suggestions // BUG - IDE hints should should suggest `data.b` to be JS `number`, // and `data.a` to be JS `string` console.log(data.b) // BUG - Unknown fields should raise linter error console.log(data.c) }); """
Activity