3
3
import type { FbtTableKey , PatternHash , PatternString } from 'babel-plugin-fbt' ;
4
4
import invariant from 'invariant' ;
5
5
import FbtHooks , {
6
- ExtraOptionValues ,
7
6
FbtInputOpts ,
8
7
FbtRuntimeInput ,
9
8
FbtTableArgs ,
@@ -230,8 +229,7 @@ function fbtName(
230
229
function wrapContent (
231
230
fbtContent : NestedFbtContentItems | string ,
232
231
translation : PatternString ,
233
- hash ?: PatternHash | null ,
234
- extraOptions ?: ExtraOptionValues | null
232
+ hash ?: PatternHash | null
235
233
) : FbtResult {
236
234
const contents = typeof fbtContent === 'string' ? [ fbtContent ] : fbtContent ;
237
235
const errorListener = FbtHooks . getErrorListener ( {
@@ -241,7 +239,6 @@ function wrapContent(
241
239
const result = FbtHooks . getFbtResult ( {
242
240
contents,
243
241
errorListener,
244
- extraOptions,
245
242
patternHash : hash ,
246
243
patternString : translation ,
247
244
} ) ;
@@ -279,25 +276,13 @@ const fbt = function () {};
279
276
*
280
277
* @param options - options for runtime
281
278
* translation dictionary access. hk stands for hash key which is used to look
282
- * up translated payload in React Native. ehk stands for enum hash key which
283
- * contains a structured enums to hash keys map which will later be traversed
284
- * to look up enum-less translated payload.
279
+ * up translated payload in React Native.
285
280
*/
286
281
fbt . _ = function fbtCallsite (
287
282
inputTable : FbtRuntimeInput ,
288
283
inputArgs ?: FbtTableArgs | null ,
289
284
options ?: FbtInputOpts | null
290
285
) : FbtResult {
291
- /*
292
- if (options?.hk || options?.ehk) {
293
- return {
294
- text: inputTable,
295
- fbt: true,
296
- hashKey: options.hk,
297
- };
298
- }
299
- */
300
-
301
286
let { args, table : pattern } = FbtHooks . getTranslatedInput ( {
302
287
args : inputArgs ,
303
288
options,
@@ -369,8 +354,7 @@ fbt._ = function fbtCallsite(
369
354
const result = this . _wrapContent (
370
355
fbtContent as NestedFbtContentItems ,
371
356
patternString ,
372
- patternHash ,
373
- options ?. eo
357
+ patternHash
374
358
) ;
375
359
if ( ! hasSubstitutions ) {
376
360
this . cachedResults [ patternString ] = result ;
0 commit comments