holepunchto / holepunchto/hypercore

DX improvement: Add `d.ts` file for autocomplete and type checking

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.9k
Forks
211
Avg merge
5h 49m
Merged PRs (30d)
9

Description

Hey there, I've been doing more VSCode/TypeScript stuff as part of work and I was wondering if you'd be open to a PR for a d.ts type to be added to this library to make it easier to do autocomplete and type checking in projects built on Hypercore.

I've got most of the API documented here already if you're open to it.

I'm thinking of doing the same for hyperswarm/corestore/hyperdrive/hyperbee/rocksdb-native.

I'd suggest adding a disclaimer like "Types are only partially supported, please submit a PR with improvements if you run up against issues."

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 reviewing the existing API definitions in types/hypercore.d.ts and comparing them with the Hypercore library API. Add the proposed Hypercore declaration file so VSCode autocomplete and TypeScript type checking cover the documented API, and include the suggested partial-support disclaimer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.