You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
Install feathers client via npm i --save feathers-client
write a connection script via the guide
Then
import*asiofrom'socket.io-client';import*ashooksfrom'feathers-hooks';importsocketiofrom'@feathersjs/socketio-client';// I tried to use "import * as socketio" tooimport*asauthenticationfrom'feathers-authentication-client';import{Connection}from'./lib/config/connection';import*asfeathersfrom'feathers-client';constsocket: SocketIOClient.Socket=io(`${Connection.Protocol}://${Connection.Host}:${Connection.Port}`);constclient: FeathersApp=feathers();// FeathersApp is not exportedclient.configure(hooks());client.configure(socketio(socket));client.configure(authentication({storage: window.localStorage,}));exportdefaultclient;
Function call socketio(socket) throws error:
"Cannot invoke an expression whose type lacks a call signature. Type 'typeof '@feathersjs/socketio-client'' has no compatible call signatures."
Package @feathersjs/socketio-client has also no declaration file in itself. I had to copy it from the feathers-typescript in my local index.d.ts
Tell us what broke. The more detailed the better.
Expected behavior
I should be able to use types from the library and should not have "any" types in function parameters and outputs.
Actual behavior
Many of lib functions use "any" type for parameters and outputs and the lib does not export types, only a value.
System configuration
Module versions (especially the part that's not working):
2.4.0 NodeJS version:
8.9.4 Operating System:
Ubuntu 16.04.3 Browser Version:
Mozilla Firefox 57.0.4 Module Loader:
"awesome-typescript-loader": "^3.4.1"
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Function call socketio(socket) throws error:
"Cannot invoke an expression whose type lacks a call signature. Type 'typeof '@feathersjs/socketio-client'' has no compatible call signatures."
Package @feathersjs/socketio-client has also no declaration file in itself. I had to copy it from the feathers-typescript in my local index.d.ts
Expected behavior
I should be able to use types from the library and should not have "any" types in function parameters and outputs.
Actual behavior
Many of lib functions use "any" type for parameters and outputs and the lib does not export types, only a value.
System configuration
Module versions (especially the part that's not working):
2.4.0
NodeJS version:
8.9.4
Operating System:
Ubuntu 16.04.3
Browser Version:
Mozilla Firefox 57.0.4
Module Loader:
"awesome-typescript-loader": "^3.4.1"
The text was updated successfully, but these errors were encountered: