computer: add more up to and from datasets

This commit is contained in:
nym21
2025-07-07 23:53:59 +02:00
parent bff22b5182
commit 8cc1f8d691
15 changed files with 1251 additions and 247 deletions

View File

@@ -52,7 +52,7 @@ export const VERSION = \"v{VERSION}\";
.join("\n");
contents += &format!(
"\n\n/** @typedef {{{}}} Index */",
"\n\n/** @typedef {{{}}} Index */\n",
indexes
.iter()
.map(|i| i.to_string())
@@ -60,10 +60,16 @@ export const VERSION = \"v{VERSION}\";
.join(" | ")
);
contents += "\n\n/** @typedef {ReturnType<typeof createVecIdToIndexes>} VecIdToIndexes */";
contents += "\n/** @typedef {keyof VecIdToIndexes} VecId */\n";
contents += "
/** @typedef {ReturnType<typeof createVecIdToIndexes>} VecIdToIndexes
/** @typedef {keyof VecIdToIndexes} VecId */
";
contents += "\nexport function createVecIdToIndexes() {\n";
contents += "
/**
* @returns {Record<any, number[]>}
*/
export function createVecIdToIndexes() {\n";
contents += " return {\n";