1 | import type * as ts from 'typescript';
|
2 | import type { Service } from '../index';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export interface TranspilerModule {
|
10 | create: TranspilerFactory;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | export declare type TranspilerFactory = (options: CreateTranspilerOptions) => Transpiler;
|
18 |
|
19 | export interface CreateTranspilerOptions {
|
20 | service: Pick<Service, Extract<'config' | 'options' | 'projectLocalResolveHelper', keyof Service>>;
|
21 | }
|
22 |
|
23 | export interface Transpiler {
|
24 | transpile(input: string, options: TranspileOptions): TranspileOutput;
|
25 | }
|
26 |
|
27 | export interface TranspileOptions {
|
28 | fileName: string;
|
29 | }
|
30 |
|
31 | export interface TranspileOutput {
|
32 | outputText: string;
|
33 | diagnostics?: ts.Diagnostic[];
|
34 | sourceMapText?: string;
|
35 | }
|