thinkjs / thinkjs/thinkjs

typescript error in think-cluster

Open
#1,512 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.3k
Forks
614
PR merge metrics
No merged PRs in 30d

Description

DESC

node_modules/think-cluster/index.d.ts:8:27 - error TS2689: Cannot extend an interface 'NodeJS.EventEmitter'. Did you mean 'implements'?

8 class Messenger extends NodeJS.EventEmitter {
~~~~~~

Found 1 error.

ENV

OS Platform: linux

Node.js Version: 12

ThinkJS Version: 3.2.11

more description

There is an error when use think-cli to create new project .

run npm run compile,

This error happen.

resolve method

from

  class Messenger extends NodeJS.EventEmitter {
  constructor();

change to

  interface Messenger extends NodeJS.EventEmitter {
    // constructor();

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 with node_modules/think-cluster/index.d.ts:8 and inspect the Messenger declaration involved in TS2689. Run npm run compile in a project created with think-cli on the reported environment, then verify compilation completes without the TypeScript error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.