From 0b918237a6e66d0d318b03620851ba0cf76ba0fc Mon Sep 17 00:00:00 2001 From: Panos Vekris Date: Fri, 2 Oct 2026 09:53:49 -0700 Subject: [PATCH] Annotate signatures affected by precise template literal types (#58805) Summary: Pull Request resolved: https://github.com/react/react-native/pull/58805 A Flow change makes the type inferred for template literals be precise TemplateLiteral signature values instead of widening to string. Exported `const`s holding templates (and `const`s referenced from template substitutions) now pull call expressions into signature verification, producing signature-verification-failure errors. Annotate the affected sites with `string` or `number` to prevent errors. Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D122889516 fbshipit-source-id: 961d3d8591d2b6731ae49a3ed2c01a4581b090b9 --- .../scripts/codegen/generate-artifacts-executor/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor/constants.js b/packages/react-native/scripts/codegen/generate-artifacts-executor/constants.js index e84ac036f9d..33c1277dec0 100644 --- a/packages/react-native/scripts/codegen/generate-artifacts-executor/constants.js +++ b/packages/react-native/scripts/codegen/generate-artifacts-executor/constants.js @@ -13,7 +13,7 @@ const fs = require('node:fs'); const path = require('node:path'); -const REACT_NATIVE_REPOSITORY_ROOT = path.join( +const REACT_NATIVE_REPOSITORY_ROOT /*: string */ = path.join( __dirname, '..', '..',