Skip to content

TypeScript types incorrect #4

@RDIL

Description

@RDIL

The type definitions for this project do not seem to be right. I've installed @node-ipc/node-ipc, and am trying to use the hello world example, but have run in to a few issues:

ipc.serve(() => {  // expected 2 params, got 1
    ipc.server.on("app.message", (data, socket) => { // ipc.server is of type boolean, not EventEmitter
        ipc.server.emit(socket, "app.message", { // ipc.server is of type boolean, not EventEmitter
            id: ipc.config.id,
            message: data.message + " world!",
        })
    })
})

It looks like @types/node-ipc is a much more comprehensive set of definitions, maybe the ones for this package should be updated to be more like them?

Thank you in advance!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions