Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

TypeScript type issues

Aperta
#977 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@joshkel ci sta già lavorando.

Dal 27/7/2025.

  • #978 di @joshkel — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
node.js, typescript
Ambito
tooling

Direzione di ricerca

Inizia ispezionando types/index.d.ts e gli import relativi nella directory types, quindi riproduci il problema con tsc usando le impostazioni NodeNext per module e moduleResolution. Il lavoro è completato quando gli import delle dichiarazioni vengono risolti correttamente e i problemi di tipo CJS/ESM segnalati da Are the Types Wrong sono stati risolti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm working on updating a Node.js TypeScript project to use TypeScript's "module": "nodenext" and "moduleResolution": "nodenext" and am getting several compiler errors similar to the following:

error TS2614: Module '"chartjs-plugin-annotation"' has no exported member 'AnnotationOptions'.
Did you mean to use 'import AnnotationOptions from "chartjs-plugin-annotation"' instead?

import type { AnnotationOptions } from 'chartjs-plugin-annotation';
              ~~~~~~~~~~~~~~~~~

From what I can tell, the problem is caused by the relative imports within chartjs-plugin-annotation's types directory. Running tsc reveals that TypeScript expects to see, e.g., a ./options file and doesn't check for ./options.d.ts:

======== Resolving module './options' from '/Users/josh/src/app/node_modules/chartjs-plugin-annotation/types/index.d.ts'. ========
Explicitly specified module resolution kind: 'NodeNext'.
Resolving in ESM mode with conditions 'import', 'types', 'node'.
Loading module as file / folder, candidate module location '/Users/josh/src/app/node_modules/chartjs-plugin-annotation/types/options', target file types: TypeScript, JavaScript, Declaration, JSON.
Directory '/Users/josh/src/app/node_modules/chartjs-plugin-annotation/types/options' does not exist, skipping all lookups in it.
======== Module name './options' was not resolved. ========

The Are the Types Wrong tool reports these as "internal resolution errors" and also points out issues with CJS versus ESM types.

Lingua principale
JavaScript
Stelle
623
Fork
377
Merge medio
11h 20m
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di chartjs/chartjs-plugin-annotation

Tutte le issue di chartjs/chartjs-plugin-annotation

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.