findUseTypeshadeDirective
이 페이지에서

findUseTypeshadeDirective()

함수, 작성 분류

SourceFile의 최상위 문장을 훑어, 처음 나오는 "use typeshade"; 지시문을 반환합니다. 지시문이 없으면 undefined를 반환합니다.

import { findUseTypeshadeDirective } from 'typeshade'

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

구문

function findUseTypeshadeDirective(
sourceFile: ts.SourceFile,
): ts.ExpressionStatement | undefined

매개변수

sourceFile ts.SourceFile

반환값

ts.ExpressionStatement | undefined

설명

SourceFile의 직접 자식만 검사합니다. 중첩된 스코프는 검사하지 않습니다.

소스

src/compiler/ts/directive.ts, 25행, 커밋 af54ddad5 기준

이 페이지 편집 문제 보고