mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-07 13:15:59 +08:00
Add definitions for 16 packages of the @feathersjs scope (#22805)
* add various packages in @feathersjs scope * formatting, make feathers package pass linting. * add typings for feathersjs core packages: @feathersjs/authentication @feathersjs/authentication-client @feathersjs/authentication-jwt @feathersjs/authentication-local @feathersjs/authentication-oauth1 @feathersjs/authentication-oauth2 @feathersjs/configuration @feathersjs/errors @feathersjs/express @feathersjs/feathers @feathersjs/primus @feathersjs/primus-client @feathersjs/rest-client @feathersjs/socket-commons @feathersjs/socketio @feathersjs/socketio-client * remove unnecessary package.json files * fix TS versions * add some tests, fix errors module, add doc comments, minor todos left
This commit is contained in:
committed by
Wesley Wigham
parent
426d98a191
commit
ea29e9588e
10
types/feathersjs__socketio/feathersjs__socketio-tests.ts
Normal file
10
types/feathersjs__socketio/feathersjs__socketio-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import feathers, { Application } from '@feathersjs/feathers';
|
||||
import feathersSocketIO from '@feathersjs/socketio';
|
||||
|
||||
const app: Application<{}> = feathers();
|
||||
|
||||
app.configure(feathersSocketIO(1337, {}));
|
||||
app.configure(feathersSocketIO(io => {}));
|
||||
app.configure(feathersSocketIO({}, io => {}));
|
||||
app.configure(feathersSocketIO(1337, io => {}));
|
||||
app.configure(feathersSocketIO(1337, {}, io => {}));
|
||||
10
types/feathersjs__socketio/index.d.ts
vendored
Normal file
10
types/feathersjs__socketio/index.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Type definitions for @feathersjs/socketio 3.0
|
||||
// Project: http://feathersjs.com/
|
||||
// Definitions by: Jan Lohage <https://github.com/j2L4e>
|
||||
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript
|
||||
|
||||
/// <reference types="socket.io" />
|
||||
|
||||
export default function feathersSocketIO(callback: (io: SocketIO.Server) => void): () => void;
|
||||
export default function feathersSocketIO(options: number | SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void;
|
||||
export default function feathersSocketIO(port: number, options?: SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void;
|
||||
26
types/feathersjs__socketio/tsconfig.json
Normal file
26
types/feathersjs__socketio/tsconfig.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@feathersjs/socketio": ["feathersjs__socketio"],
|
||||
"@feathersjs/feathers": ["feathersjs__feathers"]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts", "feathersjs__socketio-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/feathersjs__socketio/tslint.json
Normal file
3
types/feathersjs__socketio/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user