Regenerate the contracts' TypeScript: the key parsers name their parameter apart from the parts (issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 21:24:07 +01:00
parent 432df75997
commit df6d8e1c3b
8 changed files with 298 additions and 298 deletions
+36 -36
View File
@@ -36,16 +36,16 @@ export function stepsByNodeIDKey(node: string, id: string): string {
}
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
export function parseStepsByNodeIDKey(key: string): { node: string; id: string } | undefined {
let rest = key;
const at0 = rest.indexOf(".");
if (at0 <= 0) return undefined;
const node = rest.slice(0, at0);
rest = rest.slice(at0 + 1);
if (rest === "") return undefined;
const id = rest;
rest = "";
if (rest !== "") return undefined;
export function parseStepsByNodeIDKey(_key: string): { node: string; id: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const id = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, id };
}
@@ -55,14 +55,14 @@ export function pausesByPausedNodeKey(node: string): string {
}
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
export function parsePausesByPausedNodeKey(key: string): { node: string } | undefined {
let rest = key;
if (!rest.startsWith("paused.")) return undefined;
rest = rest.slice(7);
if (rest === "") return undefined;
const node = rest;
rest = "";
if (rest !== "") return undefined;
export function parsePausesByPausedNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (!_rest.startsWith("paused.")) return undefined;
_rest = _rest.slice(7);
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
@@ -72,14 +72,14 @@ export function pausesByCapacityNodeKey(node: string): string {
}
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
export function parsePausesByCapacityNodeKey(key: string): { node: string } | undefined {
let rest = key;
if (!rest.startsWith("capacity.")) return undefined;
rest = rest.slice(9);
if (rest === "") return undefined;
const node = rest;
rest = "";
if (rest !== "") return undefined;
export function parsePausesByCapacityNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (!_rest.startsWith("capacity.")) return undefined;
_rest = _rest.slice(9);
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
@@ -89,16 +89,16 @@ export function toolchainsByNodeLanguageKey(node: string, language: string): str
}
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
export function parseToolchainsByNodeLanguageKey(key: string): { node: string; language: string } | undefined {
let rest = key;
const at0 = rest.indexOf(".");
if (at0 <= 0) return undefined;
const node = rest.slice(0, at0);
rest = rest.slice(at0 + 1);
if (rest === "") return undefined;
const language = rest;
rest = "";
if (rest !== "") return undefined;
export function parseToolchainsByNodeLanguageKey(_key: string): { node: string; language: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const language = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, language };
}