@jetsonjs/stateful-controller
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Stateful controller abstract

@jetsonjs/stateful-controller

Description

Generic controller class for use as a base for component / chip / module drivers which require a state.

Dependencies

nodejs v14+
typescript 4.4.3

N.B. may work with lower versions, but tested with the above.

Please note: This code has not been verified on any version of windows

Installation

npm install @jetsonjs/stateful-controller

or

yarn add @jetsonjs/stateful-controller

Example usage

import {StatefulController} from "@jetsonjs/stateful-controller";
import {baseProps} from "@jetsonjs/stateful-controller";

interface ModuleProps extends baseProps {
    additionalProp: string;
}

interface ModuleState {
    increment: number
}

export default class ExampleModule extends StatefulController<ModuleProps, ModuleState> {};

Run the tests

$ npm install
$ npm test

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i @jetsonjs/stateful-controller

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

253 kB

Total Files

25

Last publish

Collaborators

  • irooster