Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/type_directives.ts>parseTypeDirectives

A modern runtime for JavaScript and TypeScript.
Go to Latest
function parseTypeDirectives
import { parseTypeDirectives } from "https://deno.land/x/deno@v0.28.0/cli/js/type_directives.ts";

Parses out any Deno type directives that are part of the source code, or returns undefined if there are not any.

Parameters

sourceCode: string | undefined

Returns

Map<FileReference, string> | undefined