0.2.0 • Published 2 years ago

ws-decorators v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago