Gathering detailed insights and metrics for @types/koa-websocket
Gathering detailed insights and metrics for @types/koa-websocket
Gathering detailed insights and metrics for @types/koa-websocket
Gathering detailed insights and metrics for @types/koa-websocket
The repository for high quality TypeScript type definitions.
npm install @types/koa-websocket
Typescript
Module System
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,027 Stars
89,737 Commits
30,434 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 12, 2025
Latest Version
5.0.10
Package Id
@types/koa-websocket@5.0.10
Unpacked Size
6.79 kB
Size
2.25 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
npm install --save @types/koa-websocket
This package contains type definitions for koa-websocket (https://github.com/kudos/koa-websocket).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-websocket.
1import Koa = require("koa"); 2import compose = require("koa-compose"); 3import * as http from "http"; 4import * as https from "https"; 5import * as ws from "ws"; 6 7declare module "koa" { 8 interface Context { 9 websocket: ws; 10 path: string; 11 } 12} 13 14declare namespace KoaWebsocket { 15 type Middleware<StateT = Koa.DefaultState, ContextT = Koa.DefaultContext> = compose.Middleware< 16 MiddlewareContext<StateT> & ContextT 17 >; 18 19 interface MiddlewareContext<StateT> extends Koa.Context { 20 // Limitation: Declaration merging cannot overwrap existing properties. 21 // That's why this property is here, not in the merged declaration above. 22 app: App; 23 state: StateT; 24 } 25 26 class Server<StateT = Koa.DefaultState, ContextT = Koa.DefaultContext> { 27 app: App; 28 middleware: Array<Middleware<StateT, ContextT>>; 29 server?: ws.Server | undefined; 30 31 constructor(app: Koa<StateT, ContextT>); 32 33 listen(options: ws.ServerOptions): ws.Server; 34 onConnection(socket: ws, request: http.IncomingMessage): void; 35 use(middleware: Middleware<StateT, ContextT>): this; 36 } 37 38 interface App<StateT = Koa.DefaultState, ContextT = Koa.DefaultContext> extends Koa<StateT, ContextT> { 39 ws: Server<StateT, ContextT>; 40 } 41} 42 43declare function KoaWebsocket< 44 StateT = Koa.DefaultState, 45 ContextT = Koa.DefaultContext, 46>( 47 app: Koa<StateT, ContextT>, 48 wsOptions?: ws.ServerOptions, 49 httpsOptions?: https.ServerOptions, 50): KoaWebsocket.App<StateT, ContextT>; 51 52export = KoaWebsocket; 53
These definitions were written by Maël Lavault, Jaco Greeff, Martin Ždila, Eunchong Yu, Christopher N. Katoyi-Kaba, and Zuo Jiazi.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More