Ayte / TypeScript / Archetype
This repository contains TypeScript project with basic type
declarations, such as Scalar
, IComparator<T>
, IPredicate<T>
and
some meta types like Is<X, Y>
or Mutable<T>
. This project doesn't
contain any values, thus it should leave zero footprint in compiled
derivatives.
Please note that signatures may be unstable during incubation period (but it is guaranteed that they will stay same for pre-1.0 minor version).
One may feel that this project is highly affected by family of statically-typed OOP languages - and that would be true.
Installation
yarn add @ayte/archetype
# - or -
npm install -S @ayte/archetype
Structure
Project is separated into several component packages, consolidated by
@ayte/archetype
, which exposes all of them as a single flat namespace.
- @ayte/archetype.core (src/core) contains most basic types and constraints. It obviously doesn't have any dependencies.
- @ayte/archetype.function (src/function) provides types for some commonly used function patterns. It also doesn't depend on anything.
- @ayte/archetype.collection (src/collection) is dedicated to common collection types.
- @ayte/archetype.validation (src/validation) exposes types required for simple validation.
- @ayte/archetype.value (src/value) is created for soe everyday value types and maintenance tasks like comparison. It's the only package that has actual values in it, while others contain only type definitions.
Licensing
MIT / UPL-1.0
Ayte Labs, 2020