Twoslash
Ordinary TypeScript blocks receive syntax highlighting. Adding the twoslash metadata also runs TypeScript analysis during the documentation build and embeds its results in the generated HTML.
Type query
interface Completion {
: string;
: boolean;
}
const : Completion = { : "ok", : true };
const completion: Completioncompletion;
Expected diagnostic
const answer: number = "forty-two";Ordinary code block
This block is highlighted but is not passed through Twoslash:
const greeting: string = "hello";Last updated on