Introduce "Options" argument to "fetchSegment()" function

Reviewed By: jeanlauliac

Differential Revision: D7791186

fbshipit-source-id: e3954a525e6e3b02a48ac19f78cc3716969dd6bf
This commit is contained in:
Alex Dvornikov 2018-04-27 14:49:12 -07:00 committed by Facebook Github Bot
parent 065b9991a9
commit 333602b9f2
1 changed files with 2 additions and 1 deletions

View File

@ -162,6 +162,7 @@ BatchedBridge.registerLazyCallableModule('JSDevSupportModule', () => require('JS
global.__fetchSegment = function(
segmentId: number,
options: {|+otaBuildNumber: ?string|},
callback: (?Error) => void,
) {
const {SegmentFetcher} = require('NativeModules');
@ -170,7 +171,7 @@ global.__fetchSegment = function(
'included as a NativeModule.');
}
SegmentFetcher.fetchSegment(segmentId, (errorObject: ?{message: string, code: string}) => {
SegmentFetcher.fetchSegment(segmentId, options, (errorObject: ?{message: string, code: string}) => {
if (errorObject) {
const error = new Error(errorObject.message);
(error: any).code = errorObject.code;