-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathgetMetroTransformer.d.ts
More file actions
25 lines (25 loc) · 939 Bytes
/
getMetroTransformer.d.ts
File metadata and controls
25 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Node } from "babel-core";
import { RawSourceMap } from "source-map";
import { MetroRawSourceMap } from "./composeSourceMaps";
export interface MetroTransformerResult {
ast?: Node;
code?: string;
map?: string | RawSourceMap | MetroRawSourceMap;
}
export interface MetroTransformer {
transform(props: {
filename: string;
src: string;
options: {
dev?: boolean;
retainLines?: boolean;
};
}): MetroTransformerResult;
getCacheKey?(): string;
}
export declare function getMetroTransformer(reactNativeMinorVersion?: number): MetroTransformer;
export interface ReactNativeObfuscatingTransformerDefaultResult {
code: string;
map: string;
}
export declare function maybeTransformMetroResult(upstreamResult: MetroTransformerResult, { code, map }: ReactNativeObfuscatingTransformerDefaultResult, reactNativeMinorVersion?: number): MetroTransformerResult;