findUseTypeshadeDirective()
Function in Authoring
Scan the top-level statements of a SourceFile and return the first "use typeshade"; directive, or undefined if none is present.
import { findUseTypeshadeDirective } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
function findUseTypeshadeDirective( sourceFile: ts.SourceFile,): ts.ExpressionStatement | undefinedParameters
sourceFilets.SourceFile
Return value
ts.ExpressionStatement | undefined
Description
Only direct children of the SourceFile are examined (no nested scopes).
Source
src/compiler/ts/directive.ts, line 41, at commit 26de7be8