1.0.1 • Published 3 years ago

@jetsonjs/stateful-controller v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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