mirror of
https://github.com/status-im/metro.git
synced 2025-02-18 14:07:15 +00:00
Clean up mapping types
Reviewed By: mjesun Differential Revision: D6702876 fbshipit-source-id: 5a19ba033016e14b6aaa919ef838e32ed35748c7
This commit is contained in:
parent
67385d8e4a
commit
01ab028d4f
@ -20,7 +20,6 @@ import type {RawMapping as BabelRawMapping} from 'babel-generator';
|
|||||||
import type {RawMapping as UnknownSourceMapMappingType} from 'source-map';
|
import type {RawMapping as UnknownSourceMapMappingType} from 'source-map';
|
||||||
|
|
||||||
export type UnknownSourceMapMappingTypes = Array<UnknownSourceMapMappingType>;
|
export type UnknownSourceMapMappingTypes = Array<UnknownSourceMapMappingType>;
|
||||||
export type RawMappings = Array<BabelRawMapping>;
|
|
||||||
|
|
||||||
type GeneratedCodeMapping = [number, number];
|
type GeneratedCodeMapping = [number, number];
|
||||||
type SourceMapping = [number, number, number, number];
|
type SourceMapping = [number, number, number, number];
|
||||||
@ -90,7 +89,7 @@ function fromRawMappings(
|
|||||||
* Transforms a standard source map object into a Raw Mappings object, to be
|
* Transforms a standard source map object into a Raw Mappings object, to be
|
||||||
* used across the bundler.
|
* used across the bundler.
|
||||||
*/
|
*/
|
||||||
function toRawMappings(sourceMap: BabelSourceMap): RawMappings {
|
function toRawMappings(sourceMap: BabelSourceMap): Array<BabelRawMapping> {
|
||||||
const rawMappings = [];
|
const rawMappings = [];
|
||||||
|
|
||||||
new SourceMap.SourceMapConsumer(sourceMap).eachMapping(map => {
|
new SourceMap.SourceMapConsumer(sourceMap).eachMapping(map => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user