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:
Jan Lohage
2018-01-17 20:16:10 +01:00
committed by Wesley Wigham
parent 426d98a191
commit ea29e9588e
69 changed files with 1418 additions and 0 deletions

View 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
View 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;

View 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"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}