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
The args function returns an array with 3 items of different types. Without adding as const, the inferred type of the args in the task function is an array where each item is a union of all possible values.
Consider this example
https://stackblitz.com/edit/vitejs-vite-bjrnbd?file=src%2Fmy-element.ts
The args function returns an array with 3 items of different types. Without adding
as const
, the inferred type of the args in the task function is an array where each item is a union of all possible values.At the very least, we should include this for the TS code sample, and make a note of why it's needed. https://lit.dev/docs/data/task/#the-task-function
The text was updated successfully, but these errors were encountered: