From d5e69549d63d8403d08ec1492448be5447af96d6 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Thu, 24 Oct 2024 22:23:03 -0700 Subject: [PATCH] Add readonly type annotations in fbt to prepare for natural inference Reviewed By: gkz Differential Revision: D64935657 fbshipit-source-id: 073502829685b0df06fe3e65191e43ab98332d9b --- runtime/shared/intlList.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/shared/intlList.js b/runtime/shared/intlList.js index 7a9c8da0..387db2af 100644 --- a/runtime/shared/intlList.js +++ b/runtime/shared/intlList.js @@ -28,13 +28,17 @@ const fbt = require('fbt'); const invariant = require('invariant'); const React = require('react'); -const CONJUNCTIONS = { +const CONJUNCTIONS: $ReadOnly<{|AND: 'AND', NONE: 'NONE', OR: 'OR'|}> = { AND: 'AND', NONE: 'NONE', OR: 'OR', }; -const DELIMITERS = { +const DELIMITERS: $ReadOnly<{| + BULLET: 'BULLET', + COMMA: 'COMMA', + SEMICOLON: 'SEMICOLON', +|}> = { BULLET: 'BULLET', COMMA: 'COMMA', SEMICOLON: 'SEMICOLON',