SocketCluster / SocketCluster/socketcluster-client

Typescript support

Open
#117 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
300
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to use this library in the ionic 4 app and its based on typescript. Can you tell how to import the socket cluster inside angular 2 component?

What I tried
import {socketCluster} from 'socketcluster-client'

ERROR

Could not find a declaration file for module 'socketcluster-client'. '.../node_modules/socketcluster-client/index.js' implicitly has an 'any' type.
Try npm install @types/socketcluster-client if it exists or add a new declaration (.d.ts) file containing declare module 'socketcluster-client';

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the socketcluster-client package entry point, index.js, and how TypeScript resolves the package in an Ionic or Angular application. Determine the declaration surface needed for the client import and verify that a TypeScript consumer no longer receives the missing-declaration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.