Remove $TEMPORARY$object types

Summary:
This was left over from an old codemod.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D41154548

fbshipit-source-id: 0b5fb3e78491b66ebaf13555f80e0265a25dc7d8
This commit is contained in:
Pieter De Baets
2022-11-10 04:48:13 -08:00
committed by Facebook GitHub Bot
parent 1453ef1a88
commit 8a59153bd7
14 changed files with 72 additions and 65 deletions
+2 -7
View File
@@ -26,9 +26,7 @@ export function createStringifySafeWithLimits(limits: {|
maxArrayLimit = Number.POSITIVE_INFINITY,
maxObjectKeysLimit = Number.POSITIVE_INFINITY,
} = limits;
const stack: Array<
string | {+[string]: mixed} | {'...(truncated keys)...': number},
> = [];
const stack: Array<mixed> = [];
/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by
* Flow's LTI update could not be added via codemod */
function replacer(key: string, value: mixed): mixed {
@@ -47,10 +45,7 @@ export function createStringifySafeWithLimits(limits: {|
return value;
}
let retval:
| string
| {+[string]: mixed}
| $TEMPORARY$object<{'...(truncated keys)...': number}> = value;
let retval: mixed = value;
if (Array.isArray(value)) {
if (stack.length >= maxDepth) {
retval = `[ ... array with ${value.length} values ... ]`;