Optional JSDoc rejects mandatory JavaScript setter parameters
Los mantenedores suelen responder en 1 día
@MathurAditya724 ya está trabajando en esto.
Desde el 7/11/2026.
- #3359 de @MathurAditya724 — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, node.js, typescript
Línea de trabajo
Start at the setter-parameter preflight gate and the parser representation of optional JSDoc tokens; the issue does not name source files or test paths. Add regression coverage for class and object setters, checked JavaScript, syntax negatives, many setters, and same-filename JSX snapshots, then compare assignments, stored values, descriptors, and side effects with Node. Done means comment-only optional annotations pass while executable setter restrictions and caller checks remain intact.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The generated Symbolic bindings used by the full Sentry CLI document several JavaScript setter parameters as optional in JSDoc. The executable parameters themselves are mandatory. Node accepts these setters, but scriptc rejects them before lowering.
This follows up on #3036 and #3044. They were closed as fixed by #3112, but that merged diff contains the regex change; current main still rejects this example:
class Store {
constructor() { this.stored = null; }
/** @param {string | null} [next] */
set value(next) { this.stored = next; }
}
const store = new Store();
store.value = "kept";
console.log(store.stored);
Node prints kept. scriptc reports SC0001: A 'set' accessor cannot have an optional parameter. The diagnostic points into the JSDoc comment, not an executable ? parameter. The same problem occurs for object-literal setters and with // @ts-check.
The parser represents the optional JSDoc annotation with a synthetic optional token, and the preflight gate treats it as executable setter syntax. The full CLI currently has five instances of this diagnostic in Symbolic's generated bindings.
The requested fix should admit this comment-only JavaScript case while preserving errors for real optional, default, rest, or multiple setter parameters and keeping caller type checks and reflective argument-count restrictions intact.
A dependency can contain many documented setters, so eligibility should not rescan the whole file for every diagnostic. A per-preflight index keyed by SourceFile identity can collect attached comment spans once and find a containing span with binary search. SourceFile identity matters because original and rewritten JSX snapshots can share a filename but have different offsets.
Regression coverage should include class and object setters, checked JavaScript, the real syntax negatives, many setters, and JSX snapshots sharing a filename. Native differential coverage should check assignments, stored values, descriptor behavior, and observable side effects against Node.
Reproduced with scriptc 0.4.9 built from current main and Node 24.22.1. The current-main positive setter tests fail with TS1051 before any production change. Related earlier work: #3036, #3044, #3112.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.5k
- Forks
- 212
- Merge medio
- 13 h 2 min
- PR fusionados (30 d)
- 798
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel-labs/scriptc
-
Discarded negation of a void call rejects valid JavaScriptPosiblemente ocupada @MathurAditya724 la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 1/100
vercel-labs/scriptc#3358 ·
Los mantenedores suelen responder en 1 día
-
Correct JavaScript refusal descriptions for mutable bindings and missing propertiesPosiblemente ocupada @MathurAditya724 la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
vercel-labs/scriptc#3354 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
vercel-labs/scriptc#3330 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
vercel-labs/scriptc#3210 ·
Los mantenedores suelen responder en 1 día
-
Abstract methods block coverage and direct calls when no subclass existsPosiblemente ocupada @alantriesagain la tomó hace 2 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
vercel-labs/scriptc#3077 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel-labs/scriptc
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/vscode-containers#655 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · 1 comentario ·
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepPosiblemente ocupada @albertteoh la tomó hoy. Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
jaegertracing/jaeger-ui#4739 ·
Los mantenedores suelen responder en 1 día
-
Add: Shop On TV SDAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día