Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 873 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 873 Bytes

Build Status Coverage Status MIT license

command-decorator

Implements Command Pattern using ESNext decorators.

Installation

npm install https://github.com/emotz/command-decorator

Usage

Tested on Windows, but should work on Linux/MacOS as well.

import { Command, execute } from 'command-decorator';

class TestCommand extends Command {
    @execute
    public async execute() {
        return 10;
    }
}

const cmd = new TestCommand();
cmd.execute();