Clean up mapping types

Reviewed By: mjesun

Differential Revision: D6702876

fbshipit-source-id: 5a19ba033016e14b6aaa919ef838e32ed35748c7
This commit is contained in:
Peter van der Zee 2018-01-11 15:21:30 -08:00 committed by Facebook Github Bot
parent 67385d8e4a
commit 01ab028d4f
1 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ import type {RawMapping as BabelRawMapping} from 'babel-generator';
import type {RawMapping as UnknownSourceMapMappingType} from 'source-map';
export type UnknownSourceMapMappingTypes = Array<UnknownSourceMapMappingType>;
export type RawMappings = Array<BabelRawMapping>;
type GeneratedCodeMapping = [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
* used across the bundler.
*/
function toRawMappings(sourceMap: BabelSourceMap): RawMappings {
function toRawMappings(sourceMap: BabelSourceMap): Array<BabelRawMapping> {
const rawMappings = [];
new SourceMap.SourceMapConsumer(sourceMap).eachMapping(map => {