Etymon.Schema.TypeScript
0.1.0-preview.13
dotnet add package Etymon.Schema.TypeScript --version 0.1.0-preview.13
NuGet\Install-Package Etymon.Schema.TypeScript -Version 0.1.0-preview.13
<PackageReference Include="Etymon.Schema.TypeScript" Version="0.1.0-preview.13" />
<PackageVersion Include="Etymon.Schema.TypeScript" Version="0.1.0-preview.13" />
<PackageReference Include="Etymon.Schema.TypeScript" />
paket add Etymon.Schema.TypeScript --version 0.1.0-preview.13
#r "nuget: Etymon.Schema.TypeScript, 0.1.0-preview.13"
#:package Etymon.Schema.TypeScript@0.1.0-preview.13
#addin nuget:?package=Etymon.Schema.TypeScript&version=0.1.0-preview.13&prerelease
#tool nuget:?package=Etymon.Schema.TypeScript&version=0.1.0-preview.13&prerelease
Etymon.Schema.TypeScript
TypeScript declarations from the same schema your server uses, so a non-F# frontend shares one contract.
Part of the Etymon suite. Depends on
Etymon.Core and Etymon.Schema.
TypeScript.emitOne userSchema
// Generated by Etymon. Do not edit by hand.
export interface User {
readonly id: string;
readonly name: string;
readonly email?: string;
/** What the user may do */
readonly role: "admin" | "member";
}
Types only
No fetch client, no runtime validator, no opinion about axios against fetch or ESM against CommonJS. Those are choices that age badly and that every frontend has already made differently. The part with a single right answer is the shape of the data.
Three things it gets right that a hand-written type would not
?: and | null are different. A key that may be absent is email?: string; a value that may be present and empty is value: string | null.
Conflating them is the commonest way a generated type lies about its payload,
and it is why Etymon.Schema keeps optional and nullable apart in the first
place.
An enumeration becomes a union of literals. role: "admin" | "member", not
role: string — so a typo is a compile error in the frontend as well as a 422
from the server.
Field descriptions become doc comments, so they show up in the editor.
It emits from the schema directly rather than through an OpenAPI document, which is one fewer representation to lose information in. Output is in name order and byte-identical between runs, so a change to it is a reviewable diff.
Public surface
The complete public surface of this package, every value with its full signature
and its documentation, is in Surface.fsi beside this file. It is written by the
build from the implementation, so it is where to learn what a function hands
back without compiling anything.
Licence
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Etymon.Core (>= 0.1.0-preview.13)
- Etymon.Schema (>= 0.1.0-preview.13)
- FSharp.Core (>= 8.0.100)
-
net8.0
- Etymon.Core (>= 0.1.0-preview.13)
- Etymon.Schema (>= 0.1.0-preview.13)
- FSharp.Core (>= 8.0.100)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Etymon.Schema.TypeScript:
| Package | Downloads |
|---|---|
|
Etymon
The Etymon suite: one schema definition as the source of truth for JSON codecs, validation, OpenAPI, TypeScript, configuration and database structure. This package has no code of its own; it references the parts of the suite that cost nothing but FSharp.Core. The adapters (Etymon.Api.Giraffe, Etymon.Api.AspNetCore) and the generator package (Etymon.Invariants.FsCheck) are deliberately left out, because each carries a dependency that would then be everyone's. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.13 | 0 | 9/22/2026 |
| 0.1.0-preview.12 | 0 | 9/22/2026 |
| 0.1.0-preview.11 | 0 | 9/22/2026 |
| 0.1.0-preview.10 | 0 | 9/22/2026 |
| 0.1.0-preview.9 | 0 | 9/22/2026 |
| 0.1.0-preview.8 | 0 | 9/22/2026 |
| 0.1.0-preview.7 | 0 | 9/21/2026 |
| 0.1.0-preview.6 | 0 | 9/21/2026 |
| 0.1.0-preview.5 | 0 | 9/21/2026 |
| 0.1.0-preview.4 | 28 | 9/21/2026 |
| 0.1.0-preview.3 | 33 | 9/21/2026 |
| 0.1.0-preview.2 | 39 | 9/20/2026 |
| 0.1.0-preview.1 | 38 | 9/20/2026 |