LinusU / LinusU/node-jsonlines

Wrong TypeScript definitions

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
25
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I know TypeScript definitions aren't part of this package, but I thought I'd bring attention to the fact that someone wrote TypeScript definitions for this package in @types/jsonlines (here), and they're not accurate.

Specifically, the data event was defined as emitting an interface called Lines, which is defined as:

export interface Line {
    data: string;
    type: string;
}

Which is pretty strange to me, because I've read the code in this project, and there is no such data structure ever defined. If I'm correct, the data event just emits any valid JSON value.

Mentioning @raineorshine, as they are the author of those TypeScript Definitions.

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 DefinitelyTyped PR 53304 and the @types/jsonlines definitions, then compare the data event's emitted value with this project's implementation. Done means the external TypeScript declaration accurately represents every valid JSON value emitted by data; this issue does not identify a file or test in this repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.