保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 26a09f08cf1ed43c640879f23fdad56c5c9282f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { TypeScriptExtension } from './TypeScriptExtension';
interface TypeScriptEmbeddedSource {
    sourceText: string;
    extension: '.ts' | '.tsx' | '.js';
}
interface TypeScriptEmbeddedExtensionHost {
    embeddedExtensions: string[];
    getEmbeddedSource(fileName: string): TypeScriptEmbeddedSource | undefined;
}
/**
 * It handles most of the logic required to process embedded TypeScript code (like in Vue components or MDX)
 *
 * @param embeddedExtensions List of file extensions that should be treated as an embedded TypeScript source
 *                           (for example ['.vue'])
 * @param getEmbeddedSource  Function that returns embedded TypeScript source text and extension that this file
 *                           would have if it would be a regular TypeScript file
 */
declare function createTypeScriptEmbeddedExtension({ embeddedExtensions, getEmbeddedSource, }: TypeScriptEmbeddedExtensionHost): TypeScriptExtension;
export { TypeScriptEmbeddedExtensionHost, TypeScriptEmbeddedSource, createTypeScriptEmbeddedExtension, };