Skip to content

Commit f4a22f9

Browse files
committed
chore: type the namespace frame map and analyze's framedReads for the scripts type-check
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibxDqYaHT7GBjAY9FzB
1 parent bdd3c09 commit f4a22f9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎ui/scripts/check-i18n-call-site-keys.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ function staticTextSegments(node, source) {
13531353
* test (`marketplaceNamespaceBoundary.test.ts` for this one). A namespace is
13541354
* added here or nowhere, so it cannot arrive without its frame.
13551355
*/
1356+
/** @type {Readonly<Record<string, readonly string[]>>} */
13561357
export const PACK_NAMESPACE_FRAMES = Object.freeze({
13571358
'packages/i18n/src/namespaces/marketplace/': Object.freeze(['packages/app-shell/src/console/marketplace/']),
13581359
});
@@ -2003,7 +2004,7 @@ function resolveFactoryTable(root, source, argument, parseModule) {
20032004
// ── the analysis ─────────────────────────────────────────────────────────────
20042005

20052006
/**
2006-
* `families` and `handRolled` are injectable so the synthetic-repo tests can pin
2007+
* `families`, `handRolled` and `frames` are injectable so the synthetic-repo tests can pin
20072008
* the registry RULES against a registry they control. The real run always uses
20082009
* the module constants, and every CLI path below calls `analyze(root)` with no
20092010
* options at all — so there is no configuration path a call site could quietly
@@ -2012,7 +2013,8 @@ function resolveFactoryTable(root, source, argument, parseModule) {
20122013
*
20132014
* @returns {{ findings: Array, counters: Record<string, number>, enKeyCount: number,
20142015
* referencedKeys: Set<string>, referencedBranches: Set<string>, dynamicHeads: Set<string>,
2015-
* dynamicFamilies: Map<string, { tails: Set<string>, sites: Array, multiSubstitution: number }> }}
2016+
* dynamicFamilies: Map<string, { tails: Set<string>, sites: Array, multiSubstitution: number }>,
2017+
* framedReads: Map<string, number> }}
20162018
*/
20172019
export function analyze(
20182020
root,

0 commit comments

Comments
 (0)