Description
When using render of a @lit-labs/task Task the method is typed as having a return type of unknown.
Steps to Reproduce
- Write this code
import type { Task } from "@lit-labs/task/task.js";
const task: Task = undefined!;
// Type 'unknown' is not assignable to type 'number'.ts(2322)
const test: number = task.render({
complete: () => 1
})
- The code does not typecheck because it tries to assign type
unknown to number. (Adding the three other handlers does not help as you can see in how the source code is typed)