typescript support

Open Beginner friendly
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by comparing the module's exported API with the proposed src/minecraft-protocol-forge.d.ts declaration. Check the forgeHandshake and autoVersionForge signatures and the ForgeOptions and ForgeMod interfaces, then verify that TypeScript imports resolve with those types. Done means the declaration accurately represents the module's public functions and options.

Written by the indexing model from the issue text.

Description

It could be cool to have a declaration file to have typescript support for imports.

Something like this :

// src/minecraft-protocol-forge.d.ts
declare module "minecraft-protocol-forge" {
  import { Client } from "minecraft-protocol";

  interface ForgeMod {
    modid: string;
    version: string;
  }

  interface ForgeOptions {
    forgeMods: ForgeMod[];
  }

  /**
   * Manually triggers the Forge handshake with a specific list of mods.
   */
  export function forgeHandshake(client: Client, options: ForgeOptions): void;

  /**
   * Automatically detects if the server is Forge and handles the handshake.
   * This is the recommended way for "auto-resolution".
   */
  export function autoVersionForge(client: Client): void;
}

Dominant language
JavaScript
Stars
66
Forks
27
PR merge metrics
No merged PRs in 30d

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.

More from PrismarineJS/node-minecraft-protocol-forge

All issues in PrismarineJS/node-minecraft-protocol-forge

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.