Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/compiler_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.30.0/cli/js/compiler_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