mirror of
https://github.com/status-im/metro.git
synced 2025-02-10 10:07:12 +00:00
Rename RawMapping
to MetroSourceMapSegmentTuple
Reviewed By: mjesun Differential Revision: D6702878 fbshipit-source-id: d6063e2f356d24c91ff87760fa90bf909d49f98e
This commit is contained in:
parent
01ab028d4f
commit
4cf85b278f
@ -25,16 +25,16 @@ type GeneratedCodeMapping = [number, number];
|
||||
type SourceMapping = [number, number, number, number];
|
||||
type SourceMappingWithName = [number, number, number, number, string];
|
||||
|
||||
export type MetroSourceMapSegmentTuple =
|
||||
| SourceMappingWithName
|
||||
| SourceMapping
|
||||
| GeneratedCodeMapping;
|
||||
|
||||
type FBExtensions = {
|
||||
x_facebook_offsets: Array<number>,
|
||||
x_metro_module_paths: Array<string>,
|
||||
};
|
||||
|
||||
export type RawMapping =
|
||||
| SourceMappingWithName
|
||||
| SourceMapping
|
||||
| GeneratedCodeMapping;
|
||||
|
||||
export type IndexMapSection = {
|
||||
map: MetroSourceMap,
|
||||
offset: {line: number, column: number},
|
||||
@ -58,7 +58,7 @@ export type FBSourceMap = FBIndexMap | (BabelSourceMap & FBExtensions);
|
||||
*/
|
||||
function fromRawMappings(
|
||||
modules: $ReadOnlyArray<{
|
||||
+map: ?Array<RawMapping>,
|
||||
+map: ?Array<MetroSourceMapSegmentTuple>,
|
||||
+path: string,
|
||||
+source: string,
|
||||
+code: string,
|
||||
@ -110,7 +110,7 @@ function toRawMappings(sourceMap: BabelSourceMap): Array<BabelRawMapping> {
|
||||
return rawMappings;
|
||||
}
|
||||
|
||||
function compactMapping(mapping: BabelRawMapping): RawMapping {
|
||||
function compactMapping(mapping: BabelRawMapping): MetroSourceMapSegmentTuple {
|
||||
const {column, line} = mapping.generated;
|
||||
const {name, original} = mapping;
|
||||
|
||||
|
@ -21,10 +21,13 @@ import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
|
||||
import type {TransformCache} from '../lib/TransformCaching';
|
||||
import type {Reporter} from '../lib/reporting';
|
||||
import type {HasteImpl} from '../node-haste/Module';
|
||||
import type {MetroSourceMap as SourceMap, RawMapping} from 'metro-source-map';
|
||||
import type {
|
||||
MetroSourceMap as SourceMap,
|
||||
MetroSourceMapSegmentTuple,
|
||||
} from 'metro-source-map';
|
||||
|
||||
type BundleType = 'bundle' | 'delta' | 'map' | 'ram' | 'cli' | 'hmr' | 'todo';
|
||||
type SourceMapOrMappings = SourceMap | Array<RawMapping>;
|
||||
type SourceMapOrMappings = SourceMap | Array<MetroSourceMapSegmentTuple>;
|
||||
|
||||
export type BundleOptions = {
|
||||
+assetPlugins: Array<string>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user