collections.ts 437 B

1234567891011121314
  1. // 数组、只读数组、元组(定长/可选/rest)、Record → additionalProperties。
  2. interface Collections {
  3. tags: string[];
  4. frozen: readonly number[];
  5. pair: [string, number];
  6. optionalTail: [string, number?];
  7. restTail: [string, ...number[]];
  8. scores: Record<string, number>;
  9. matrix: number[][];
  10. }
  11. const g = agent("collector");
  12. const out = await g.ask<Collections>("gather collections");
  13. log(JSON.stringify(out));