Annotate empty arrays in xplat

Summary: Changelog: [Internal]

Differential Revision: D40410427

fbshipit-source-id: f819fcb00673e19b21aecb383541850436805a0e
This commit is contained in:
Sam Zhou
2022-10-17 12:40:57 -07:00
committed by Facebook GitHub Bot
parent cb2dcd327c
commit a0ee6fae5e
15 changed files with 27 additions and 23 deletions
+3 -1
View File
@@ -26,7 +26,9 @@ export function createStringifySafeWithLimits(limits: {|
maxArrayLimit = Number.POSITIVE_INFINITY,
maxObjectKeysLimit = Number.POSITIVE_INFINITY,
} = limits;
const stack = [];
const stack: Array<
string | {+[string]: mixed} | {'...(truncated keys)...': number},
> = [];
/* $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 {