From 05936a53d4d6731d1b49c05917ccc6bab64ed8e0 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Tue, 23 May 2017 10:24:59 -0700 Subject: [PATCH] Covariant properties for `ModuleTransportLike` Summary: Make all properties of `ModuleTraansportLike` covariant to enforce read-only behavior at all sites using it. The type only exists for compatibility reasons between old and new output functionality, and covariant properties give us stronger guarantees. Reviewed By: jeanlauliac Differential Revision: D5111667 fbshipit-source-id: 674658b07eb3a229cbc4344cb636e4a9ea4126d1 --- packages/metro-bundler/src/lib/ModuleTransport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/metro-bundler/src/lib/ModuleTransport.js b/packages/metro-bundler/src/lib/ModuleTransport.js index 4ba20267..9e91ef3c 100644 --- a/packages/metro-bundler/src/lib/ModuleTransport.js +++ b/packages/metro-bundler/src/lib/ModuleTransport.js @@ -15,7 +15,7 @@ import type {RawMapping} from '../Bundler/source-map'; import type Module from '../node-haste/Module'; import type {SourceMap} from './SourceMap'; -type SourceMapOrMappings = SourceMap | Array; +export type SourceMapOrMappings = SourceMap | Array; type Metadata = { dependencies?: ?Array,