Download frontends/react/src/contract.check.ts from elvis-hf/attention: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/elvis-hf/attention/resolve/main/frontends/react/src/contract.check.ts
- Command line
-
hf download hf://spaces/elvis-hf/attention/frontends/react/src/contract.check.ts
-
curl -L -o contract.check.ts https://huggingface.co/spaces/elvis-hf/attention/resolve/main/frontends/react/src/contract.check.ts
1.37 kB
| // Type-checks the contract examples (backend/contract/*.json) against | |
| // AttentionApi when tsc runs. Never imported by the app. | |
| // The Python side is checked by backend/tests/test_contract.py. | |
| import type { ContractExample } from "@elvis/pyodide"; | |
| import type { AttentionApi } from "./python.ts"; | |
| import emptySentence from "../../../backend/contract/empty_sentence.json"; | |
| import inspect from "../../../backend/contract/inspect.json"; | |
| import inspectBeforeTranslate from "../../../backend/contract/inspect_before_translate.json"; | |
| import schoolTomorrow from "../../../backend/contract/school_tomorrow.json"; | |
| import tooLong from "../../../backend/contract/too_long.json"; | |
| import trainStationFrench from "../../../backend/contract/train_station_french.json"; | |
| import unknownWord from "../../../backend/contract/unknown_word.json"; | |
| emptySentence satisfies ContractExample<AttentionApi, typeof emptySentence>; | |
| inspect satisfies ContractExample<AttentionApi, typeof inspect>; | |
| inspectBeforeTranslate satisfies ContractExample<AttentionApi, typeof inspectBeforeTranslate>; | |
| schoolTomorrow satisfies ContractExample<AttentionApi, typeof schoolTomorrow>; | |
| tooLong satisfies ContractExample<AttentionApi, typeof tooLong>; | |
| trainStationFrench satisfies ContractExample<AttentionApi, typeof trainStationFrench>; | |
| unknownWord satisfies ContractExample<AttentionApi, typeof unknownWord>; | |