• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Romakita / ts-express-decorators / 1965 / 4
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 03 May 2018 06:10AM UTC
Files 235
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 May 2018 06:04AM UTC coverage: 100.0%. Remained the same
1965.4

push

travis-ci

Romakita
feat(socketio): Add argument on Nsp decorator

Argument given to Nsp decorator allow to inject on the property class (socket service),
a specific namespace (other than the default Namespace used by the socket service).

```typescript
import * as SocketIO from "socket.io";
import {SocketService, IO, Nsp, Socket, SocketSession} from "@tsed/socketio";

@SocketService("/my-namespace")
export class MySocketService {

    @Nsp nsp: SocketIO.Namespace;

    @Nsp("/my-other-namespace")
    nspOther: SocketIO.Namespace; // communication between two namespace

    constructor(@IO private io: SocketIO.Server) {}
    /**
     * Triggered the namespace is created
     */
    $onNamespaceInit(nsp: SocketIO.Namespace) {

    }
    /**
     * Triggered when a new client connects to the Namespace.
     */
    $onConnection(@Socket socket: SocketIO.Socket, @SocketSession session: SocketSession) {

    }
    /**
     * Triggered when a client disconnects from the Namespace.
     */
    $onDisconnect(@Socket socket: SocketIO.Socket) {

    }
}
```

Closes: #307

1040 of 1140 branches covered (91.23%)

3295 of 3295 relevant lines covered (100.0%)

161.31 hits per line

Source Files on job 1965.4
  • Tree
  • List 0
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1713
  • Travis Job 1965.4
  • 018cf711 on github
  • Prev Job for on master (#1964.5)
  • Next Job for on master (#1968.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc