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 11:16:10 -08:00
committed by Wesley Wigham
parent 426d98a191
commit ea29e9588e
69 changed files with 1418 additions and 0 deletions
@@ -0,0 +1,10 @@
import feathers, { Application } from '@feathersjs/feathers';
import feathersSocketIOClient from '@feathersjs/socketio-client';
import * as io from 'socket.io-client';
const socket = io();
const app: Application<{}> = feathers();
app.configure(feathersSocketIOClient(socket));
app.configure(feathersSocketIOClient(socket, { timeout: 1337 }));
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for @feathersjs/socketio-client 1.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-client" />
export default function feathersSocketIOClient(socket: SocketIOClient.Socket, options?: FeathersSocketIOClientOptions): () => void;
export interface FeathersSocketIOClientOptions {
timeout?: number;
}
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@feathersjs/socketio-client": ["feathersjs__socketio-client"],
"@feathersjs/feathers": ["feathersjs__feathers"]
}
},
"files": [
"index.d.ts", "feathersjs__socketio-client-tests.ts"
]
}
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}