Type transformCode

Reviewed By: davidaurelio

Differential Revision: D7169708

fbshipit-source-id: b886ea7b3e694ada4d930df9fa6aec1cdc188d98
This commit is contained in:
Miguel Jimenez Esun 2018-03-06 18:03:34 -08:00 committed by Facebook Github Bot
parent 8a10127b58
commit 0e9e2505dd

View File

@ -26,11 +26,15 @@ const {
} = require('metro-source-map');
import type {PostProcessModules} from '../DeltaBundler';
import type {TransformedCode} from '../JSTransformer/worker';
import type {
TransformedCode,
Options as WorkerOptions,
} from '../JSTransformer/worker';
import type {DynamicRequiresBehavior} from '../ModuleGraph/worker/collectDependencies';
import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
import type {TransformCache} from '../lib/TransformCaching';
import type {Reporter} from '../lib/reporting';
import type Module from '../node-haste/Module';
import type {BabelSourceMap} from '@babel/core';
import type {CacheStore} from 'metro-cache';
import type {
@ -242,9 +246,9 @@ class Bundler {
}
async _cachedTransformCode(
module,
code,
transformCodeOptions,
module: Module,
code: string,
transformCodeOptions: WorkerOptions,
): Promise<TransformedCode> {
const cache = this._cache;
let result;