type_system
Type-safe custom type systems in TypeScript.
Usage
import type {
Schema,
System,
} from "https://deno.land/x/type_system@$VERSION/mod.ts";
const SCHEMA = {
deno_deploy: {
project_name: "string",
},
google_sheets: {
sheet_id: "string",
},
} as const satisfies Schema;
const system: System<typeof SCHEMA> = {
components: [
{
type: "deno_deploy",
project_name: "deno-deploy-project-name",
},
{
type: "google_sheets",
sheet_id: "google-sheets-sheet-id",
},
],
};
console.log(system);
Development
Make sure to install Deno: https://deno.land/manual/getting_started/installation.
Format the project:
deno fmt
Lint the project:
deno lint
Run tests:
deno test
Update dependencies:
deno task udd
License
Developed with 💖 by @EthanThatOneKid