0.2.0 • Published 3 years ago

ws-decorators v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ws-decorators

This library aims to make object-oriented WebSocket server design easier with TypeScript decorators. It was inspired by the Fastify plugin fastify-decorators.

Setup

Install

Install with npm

npm i ws-decorators

TypeScript configuration

Please enable the experimentalDecorators and emitDecoratorMetadata features in your TypeScript config:

tsconfig.json

{
    "compilerOptions": {
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true
    }
}

Reflect Metadata

Make sure to import the reflect-metadata shim at the beginning of your code:

import 'reflect-metadata`

Usage

Please see the pizza example.

0.2.0

3 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago