runtypes - Runtime validation for static types

  •        19

Runtypes allow you to take values about which you have no assurances and check that they conform to some type A. This is done by means of composable type validators of primitives, literals, arrays, tuples, records, unions, intersections and more. If the object doesn't conform to the type specification, check will throw an exception.

https://github.com/pelotom/runtypes

Tags
Implementation
License
Platform

   




Related Projects

io-ts - TypeScript compatible runtime type system for IO decoding/encoding

  •    TypeScript

A value of type Type<A, O, I> (called "runtime type") is the runtime representation of the static type A. Note. The Either type is defined in fp-ts, a library containing implementations of common algebraic types in TypeScript.

ts-express-decorators - :triangular_ruler: A TypeScript Framework on top of Express

  •    TypeScript

Ts.ED is a framework on top of Express to write your application with TypeScript (or in ES6). It provides a lot of decorators to write your code. Important! TsExpressDecorators requires Node >= 6, Express >= 4, TypeScript >= 2.0 and the experimentalDecorators, emitDecoratorMetadata, types and lib compilation options in your tsconfig.json file.

utility-types - Utility Types for TypeScript (provide migration from Flow's Utility Types)

  •    TypeScript

The primary goal of this library is to provide a set of proven Utility Types (inspired by Set Theory and functional languages) that should complement existing TypeScript Mapped Types. The secondary goal is to provide a compatibility layer with Flow's Utility Types. Flow and TypeScript have a lot in common. By using this library TypeScript Developers will become more familiar with differences to "Flow" and extend their static-typing toolbelt. Moreover it can help to migrate between "Flow" and "TypeScript" projects much easier.

class-validator - Validation made easy using TypeScript decorators.

  •    TypeScript

Class-based validation with Typescript / ES6 / ES5 using decorators or validation schemas. Supports both node.js and browser

class-validator - Validation made easy using TypeScript decorators.

  •    TypeScript

Allows use of decorator and non-decorator based validation. Internally uses validator.js to perform validation. Class-validator works on both browser and node.js platforms. Note: Please use at least npm@6 when using class-validator as from npm@6 the dependency tree is flatterned what is good for us.


light-4j - A fast, lightweight and more productive microservices framework

  •    Java

Light 4j is a fast, lightweight and cloud native microservices framework. Light means lightweight, lighting fast and shed light on how to program with modern Java SE. It is 44 times faster than the most popular microservices platform Spring Boot embedded Tomcat and use only 1/5 of memory.

enforce - Python 3.5+ runtime type checking for integration testing and data validation

  •    Python

Enforce.py is a Python 3.5+ library for integration testing and data validation through configurable and optional runtime type hint enforcement. It uses the standard type hinting syntax (defined in PEP 484). NOTICE: Python versions 3.5.2 and earlier (3.5.0-3.5.2) are now deprecated. Only Python versions 3.5.3+ would be supported. Deprecated versions will no longer be officially supported in Enforce.py version 0.4.x.

MonkeyType - A system for Python that generates static type annotations by collecting runtime types

  •    Python

MonkeyType collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type annotations directly to your Python code based on the types collected at runtime. By default this will dump call traces into a sqlite database in the file monkeytype.sqlite3 in the current working directory. You can then use the monkeytype command to generate a stub file for a module, or apply the type annotations directly to your code.

react-redux-typescript-guide - The complete guide to static typing in "React & Redux" apps using TypeScript

  •    TypeScript

You should check out Playground Project located in the /playground folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type definitions (like @types/react or @types/react-redux) to ensure the examples are up-to-date and not broken with updated definitions. Playground was created in such a way that you can simply clone the repository locally and immediately play around on your own. It will help you to learn all the examples from this guide in a real project environment without the need to create some complicated environment setup by yourself.

DragonBonesJS - DragonBones TypeScript / JavaScript Runtime

  •    Javascript

run npm install -g dragonbones-runtime to install the dragonbones-runtime in global. Copyright (c) 2012-2018 The DragonBones team and other contributors.

deno - A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

  •    Rust

A secure runtime for JavaScript and TypeScript built with V8, Rust, and Tokio. Deno aims to provide a productive and secure scripting environment for the modern programmer. It is built on top of V8, Rust, and TypeScript.

superstruct - A simple and composable way to validate data in Javascript.

  •    Javascript

A simple and composable way to validate data in JavaScript. Superstruct makes it easy to define interfaces and then validate JavaScript data against them. Its type annotation API was inspired by Typescript, Flow, Go, and GraphQL, giving it a familiar and easy to understand API.

angular-starter - :tada: An Angular Starter kit featuring Angular (Router, Http, Forms, Services, Tests, E2E, Dev/Prod, HMR, Async/Lazy Routes, AoT via ngc), Karma, Protractor, Jasmine, Istanbul, TypeScript, TsLint, Codelyzer, Hot Module Replacement, @types, and Webpack by @TipeIO

  •    Javascript

An Angular starter kit featuring Angular 5, Ahead of Time Compile, Router, Forms, Http, Services, Tests, E2E), Karma, Protractor, Jasmine, Istanbul, TypeScript, @types, TsLint, Codelyzer, Hot Module Replacement, and Webpack by AngularClass.This seed repo serves as an Angular starter for anyone looking to get up and running with Angular and TypeScript fast. Using a Webpack 3 for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests.

typewiz - Automatically discover and add missing types in your TypeScript code

  •    TypeScript

Automatically discover and add missing types in your TypeScript code. For front-end code, please have a look at the TypeWiz WebPack Plugin.

prop-types - Custom React PropType validators that we use at Airbnb.

  •    Javascript

Custom React PropType validators that we use at Airbnb. Use of airbnb-js-shims or the equivalent is recommended.Since PropTypes are typically not included in production builds of React, this library’s functionality serves no useful purpose. As such, when the NODE_ENV environment variable is "production", instead of exporting the implementations of all these prop types, we export mock functions - in other words, something that ensures that no exceptions are thrown, but does no validation. When environment variables are inlined (via a browserify transform or webpack plugin), then tools like webpack or uglify are able to determine that only the mocks will be imported - and can avoid including the entire implementations in the final bundle that is sent to the browser. This allows for a much smaller ultimate file size, and faster in-browser performance, without sacrificing the benefits of PropTypes themselves.

TNValidate - A Fluent Validation Library for .NET

  •    

TNValidate is a fluent validation library for .Net. It enables you to write validation logic in a way that somewhat resembles natural language. TNValidate comes with built in rules for different types of data, can generate errors in a couple of languages, and is extensible.

react-typescript-cheatsheet - a cheatsheet for react users using typescript with react for the first (or nth!) time

  •    

jpavon offers an alternative react-scripts-ts with Webpack 4 and better linting. In particular, make sure that you have @types/react and @types/react-dom installed. Read more about the DefinitelyTyped project if you are unfamiliar. There are also many React + Typescript boilerplates, please see our Resources list below.