Download content/fixtures/code.ts from akunasoftware/test-corpus: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/datasets/akunasoftware/test-corpus/resolve/main/content/fixtures/code.ts
- Command line
-
hf download hf://datasets/akunasoftware/test-corpus/content/fixtures/code.ts
-
curl -L -o code.ts https://huggingface.co/datasets/akunasoftware/test-corpus/resolve/main/content/fixtures/code.ts
722 Bytes
| type AuditEvent = { | |
| readonly id: string; | |
| readonly kind: "created" | "reviewed" | "approved"; | |
| readonly detail: string; | |
| }; | |
| const events: AuditEvent[] = [ | |
| { id: "evt-001", kind: "created", detail: "draft request opened" }, | |
| { id: "evt-002", kind: "reviewed", detail: "extraction fixture marker: shared code sample" }, | |
| { id: "evt-003", kind: "approved", detail: "manager approval recorded" }, | |
| ]; | |
| function describeReviewEvents(auditEvents: readonly AuditEvent[]): string[] { | |
| return auditEvents | |
| .filter((event) => event.kind === "reviewed") | |
| .map((event) => `${event.id}: ${event.detail}`); | |
| } | |
| for (const description of describeReviewEvents(events)) { | |
| console.log(description); | |
| } | |