GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NeaByteLab/Typebox: Stop writing schemas twice. Define logic as functions, let Typebox infer the types and activate them into a callable facade.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
src
src
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
deno.json
deno.json
 
 

Repository files navigation

Typebox

Contract language for TypeScript where programs are typed contracts

Deno JSR License

Installation

Note

Prerequisites: Install Deno from deno.com.

Deno (via JSR):

deno add jsr:@neabyte/typebox

Or import directly from JSR:

import { Define, Loader } from 'jsr:@neabyte/typebox'

Quick Start

import { Define, Loader } from '@neabyte/typebox'

const app = Loader({
  add: Define((props: { a: number; b: number }) => props.a + props.b),
  counter: Define.state(0, (count, amount: number) => count + amount)
})

app.add({ a: 2, b: 3 }) // 5
app.counter(5) // 5
app.counter.get() // 5

Read docs/README.md for full documentation.

Testing

Type check - format, lint, and type-check:

deno task check

Unit tests - format/lint tests and run all tests:

deno task test
  • Tests live under tests/ (globals, utils, helpers, and index tests).
  • The test task uses --allow-read, --allow-write, and --allow-env.

License

This project is licensed under the MIT license. See the LICENSE file for details.

About

Stop writing schemas twice. Define logic as functions, let Typebox infer the types and activate them into a callable facade.

jsr.io/@neabyte/typebox

Topics

compile-timecontractdeepfreezedenodeveloper-toolsfail-closedfunctional-programmingimmutabilityjsrlibrarymicro-frameworkruntime-safetystate-managementstructured-clonetype-driventype-inferencetype-safetytype-systemtypescriptvalidation

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.