保誠-保戶業務員媒合平台
HelenHuang
2022-05-20 13d66456556a5c0a8f1ed519c01e7bd2f31d2160
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, };