Spaces:
Running
Running
Download frontends/react/src/contract.check.ts from nhamid289/optimization-dev: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/spaces/nhamid289/optimization-dev/resolve/main/frontends/react/src/contract.check.ts
- Command line
-
hf download hf://spaces/nhamid289/optimization-dev/frontends/react/src/contract.check.ts
-
curl -L -o contract.check.ts https://huggingface.co/spaces/nhamid289/optimization-dev/resolve/main/frontends/react/src/contract.check.ts
1 kB
| // Type-checks the contract examples (backend/contract/*.json) against | |
| // OptimisationApi 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 { OptimisationApi } from "./python.ts"; | |
| import gradientDescentQuadratic from "../../../backend/contract/gradient_descent_quadratic.json"; | |
| import invalidFunction from "../../../backend/contract/invalid_function.json"; | |
| import newtonSingularHessian from "../../../backend/contract/newton_singular_hessian.json"; | |
| import pastTheEnd from "../../../backend/contract/past_the_end.json"; | |
| gradientDescentQuadratic satisfies ContractExample<OptimisationApi, typeof gradientDescentQuadratic>; | |
| invalidFunction satisfies ContractExample<OptimisationApi, typeof invalidFunction>; | |
| newtonSingularHessian satisfies ContractExample<OptimisationApi, typeof newtonSingularHessian>; | |
| pastTheEnd satisfies ContractExample<OptimisationApi, typeof pastTheEnd>; | |