dice-roller/rpg-dice-roller

Issues with module's types

Offen

#247 geöffnet am 01.04.2022

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (68 Forks)auto 404
bughelp wanted

Repository-Metriken

Stars
 (279 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Describe the bug Some of the type definitions seems to be faulty or incomplete.

To Reproduce Steps to reproduce the behaviour:

  1. Bootstrap a new typescript project with the defaults (npm i typescript --save-dev && npx tsc --init)
  2. Install the module via npm (npm install @dice-roller/rpg-dice-roller)
  3. Create an example file index.ts (see below)
  4. Set skipLibCheck to false in tsconfig.json
  5. Run tsc to build the project

Expected behaviour No type errors show up.

Code snippet

import { DiceRoll } from "@dice-roller/rpg-dice-roller"

const roller = new DiceRoll("6d6")

console.log(roller.toString())

Environment:

  • Node.js 17.3.0 on Windows 10 & Node.js 16.14.2 on Ubuntu 20.04.4 installed from nodesource
  • Module version 5.1.0, 5.0.0 has the same behaviour

Contributor Guide