Skip to content
@traits-ts

traits-ts

Traits for TypeScript Classes

traits-ts.org

Traits for TypeScript Classes

Traits TS is a project for providing a Traits mechanism for TypeScript. It consists of the core @traits-ts/core and the companion standard library @traits-ts/stdlib.

The base @traits-ts/core is a TypeScript library providing the bare traits (aka mixins) mechanism for extending classes with multiple base functionalities, although TypeScript/JavaScript technically do not allow multiple inheritance. For this, it internally leverages the regular class extends mechanism at the JavaScript level, so it is does not have to manipulate the run-time objects at all. At the TypeScript level, it is fully type-safe and correctly derives all properties of the traits a class is derived from.

The companion @traits-ts/stdlib provides a set of standard, reusable, generic, typed traits, based on @traits-ts/core. Currently, this standard library provides the particular traits Identifiable, Configurable, Bindable, Subscribable, Hookable, Disposable, Traceable, and Serializable.

This is Traits TS, the home of the project. Its two main parts can be found here:

Pinned Loading

  1. core core Public

    Traits for TypeScript Classes (Core)

    TypeScript 24

  2. stdlib stdlib Public

    Traits for TypeScript Classes (Standard Library)

    TypeScript 5

Repositories

Showing 4 of 4 repositories
  • stdlib Public

    Traits for TypeScript Classes (Standard Library)

    traits-ts/stdlib’s past year of commit activity
    TypeScript 5 0 0 0 Updated Apr 6, 2025
  • core Public

    Traits for TypeScript Classes (Core)

    traits-ts/core’s past year of commit activity
    TypeScript 24 0 1 0 Updated Apr 6, 2025
  • website Public

    Traits for TypeScript Classes (Website)

    traits-ts/website’s past year of commit activity
    HTML 0 0 0 0 Updated Mar 7, 2025
  • .github Public

    Traits for TypeScript Classes

    traits-ts/.github’s past year of commit activity
    0 0 0 0 Updated Mar 6, 2025

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…