Checker rejects an ArrayBuffer constructor result for an ArrayBuffer parameter

Aperta
#3,827 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, typescript
Ambito
compilers

Direzione di ricerca

Start with the type checker path that validates function arguments and compare how it handles the parameter’s ArrayBuffer type with the type of new ArrayBuffer(1). Run the repro with sharpts --no-tsconfig repro.ts and compare it with tsc --noEmit repro.ts. Done when SharpTS accepts the call, matching TypeScript 5.9.3.

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

Descrizione

A plain ArrayBuffer parameter rejects a newly constructed ArrayBuffer with the default library enabled.

function accept(buffer: ArrayBuffer): void {}
accept(new ArrayBuffer(1));

TypeScript 5.9.3 accepts this with tsc --noEmit repro.ts. SharpTS reports Argument 1 expected type 'interface ArrayBuffer' but got 'interface ArrayBuffer' when run as sharpts --no-tsconfig repro.ts. Reproduced with the #3820 build while checking #3819.

Lingua principale
C#
Stelle
156
Fork
4
Merge medio
14h 45m
PR unite (30g)
40

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 nickna/SharpTS

Tutte le issue di nickna/SharpTS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.