import { todo } from "https://deno.land/x/fun@v2.0.0-alpha.6/fn.ts";
A function that can be called to output any type. It's used for type hole based programming. This allows one to define interfaces and types for a function and stub them with todo() until you are ready to implement the actual behavior. The todo function will throw if it is ever actually called.
Examples
Example 1
Example 1
import { todo } from "./fn.ts";
type InOut = {
read: () => Promise<string>,
write: (s: string) => Promise<unknown>,
}
const mockInOut: InOut = todo(); // InOut !!THROWS!!