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 f0ed2d9b12
commit 07ec4b1f31
12 changed files with 390 additions and 390 deletions
+66 -66
View File
@@ -60,16 +60,16 @@ export function haveByNodeModuleKey(node: string, module: string): string {
}
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
export function parseHaveByNodeModuleKey(key: string): { node: string; module: 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 module = rest;
rest = "";
if (rest !== "") return undefined;
export function parseHaveByNodeModuleKey(_key: string): { node: string; module: 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 module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
@@ -79,13 +79,13 @@ export function haveByNodeNodeKey(node: string): string {
}
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
export function parseHaveByNodeNodeKey(key: string): { node: string } | undefined {
let rest = key;
const at0 = rest.indexOf(".node");
if (at0 <= 0) return undefined;
const node = rest.slice(0, at0);
rest = rest.slice(at0 + 5);
if (rest !== "") return undefined;
export function parseHaveByNodeNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
@@ -95,20 +95,20 @@ export function composedByNodeModuleFingerprintKey(node: string, module: string,
}
/** The parts of a key of the form "<node>.<module>.<fingerprint>", or undefined for a key of another form. */
export function parseComposedByNodeModuleFingerprintKey(key: string): { node: string; module: string; fingerprint: 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);
const at2 = rest.indexOf(".");
if (at2 <= 0) return undefined;
const module = rest.slice(0, at2);
rest = rest.slice(at2 + 1);
if (rest === "") return undefined;
const fingerprint = rest;
rest = "";
if (rest !== "") return undefined;
export function parseComposedByNodeModuleFingerprintKey(_key: string): { node: string; module: string; fingerprint: 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);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const module = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const fingerprint = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module, fingerprint };
}
@@ -118,13 +118,13 @@ export function composedByNodeNodeKey(node: string): string {
}
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
export function parseComposedByNodeNodeKey(key: string): { node: string } | undefined {
let rest = key;
const at0 = rest.indexOf(".node");
if (at0 <= 0) return undefined;
const node = rest.slice(0, at0);
rest = rest.slice(at0 + 5);
if (rest !== "") return undefined;
export function parseComposedByNodeNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
@@ -134,16 +134,16 @@ export function dataByNodeModuleKey(node: string, module: string): string {
}
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
export function parseDataByNodeModuleKey(key: string): { node: string; module: 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 module = rest;
rest = "";
if (rest !== "") return undefined;
export function parseDataByNodeModuleKey(_key: string): { node: string; module: 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 module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
@@ -153,12 +153,12 @@ export function packagesByNodeKey(node: string): string {
}
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
export function parsePackagesByNodeKey(key: string): { node: string } | undefined {
let rest = key;
if (rest === "") return undefined;
const node = rest;
rest = "";
if (rest !== "") return undefined;
export function parsePackagesByNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
@@ -168,12 +168,12 @@ export function healthByNodeKey(node: string): string {
}
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
export function parseHealthByNodeKey(key: string): { node: string } | undefined {
let rest = key;
if (rest === "") return undefined;
const node = rest;
rest = "";
if (rest !== "") return undefined;
export function parseHealthByNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
@@ -183,12 +183,12 @@ export function findingsByKeyKey(key: string): string {
}
/** The parts of a key of the form "<key>", or undefined for a key of another form. */
export function parseFindingsByKeyKey(key: string): { key: string } | undefined {
let rest = key;
if (rest === "") return undefined;
const key = rest;
rest = "";
if (rest !== "") return undefined;
export function parseFindingsByKeyKey(_key: string): { key: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const key = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { key };
}