Optional setter JSDoc is mistaken for optional executable syntax
Los mantenedores suelen responder en 1 día
@MathurAditya724 ya está trabajando en esto.
Desde el 5/11/2026.
- #3044 de @MathurAditya724 — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript, wasm
- Área
- compilers
Línea de trabajo
Start with the JSDoc setter parameter handling that emits TS1051, then inspect the setter lowering and regression tests; the issue names no source files or test entry points. Reproduce with the setter.mjs example and compare against Node 24.22.1. Done means optional JSDoc names no longer change setter arity, executable optional and rest forms still receive their existing refusals, and regression tests cover accessors, arguments, inheritance, and native behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
We are compiling the full Sentry CLI with scriptc while retaining the Symbolic WASM wrapper used for debug-file handling. Five generated setters are rejected because their JSDoc marks the accepted value as optional, even though each executable setter has one ordinary parameter.
A reduced example is:
class Box {
/** @param {string | null} [next] */
set value(next) {
console.log(next);
}
}
new Box().value = null;
Save this as setter.mjs. Node 24.22.1 prints null. scriptc built from current main reports A 'set' accessor cannot have an optional parameter (TS1051 / SC0001). The diagnostic points inside [next] in the comment. There is no optional parameter token in the setter's executable syntax.
Expected behavior is to distinguish erased JSDoc optionality from an actually optional setter parameter. The comment should not change the setter's declared arity, and ordinary property assignments of null or undefined should follow the same runtime behavior as Node. The existing refusals for executable setter parameter forms should remain unchanged by this comment-specific fix. This includes optional and rest syntax, and the separate default-initializer case that scriptc does not yet lower exactly. Authored TypeScript checks should also remain intact.
The generated wrapper includes getter/setter pairs, so accepting the comment alone is not enough: regression tests should check setter-only properties, matching getter/setter pairs, argument handling and inheritance, with native differential execution. Any signature normalization must preserve the actual read and write behavior.
I checked existing work before filing. #2758 handles TS7032 for unannotated setters, while #2927 discusses the separate TS1052 default-initializer case. Neither addresses TS1051 inside an optional JSDoc name. Resolving this case removes the first five observed setter diagnostics, rather than proving that every later WASM-wrapper path works.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.4k
- Forks
- 204
- Merge medio
- 7 h 45 min
- PR fusionados (30 d)
- 845
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
-
`process.execPath` uses the ANSI API on Windows, so non-ASCII paths are garbled when the ANSI code page is not UTF-8Posiblemente ocupada @ctate la tomó hace 1 día. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
vercel-labs/scriptc#2910 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
vercel-labs/scriptc#3048 ·
Los mantenedores suelen responder en 1 día
-
Object-shape and declaration-assignment diagnostics describe the wrong JavaScript behaviorPosiblemente ocupada @MathurAditya724 la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
vercel-labs/scriptc#3037 ·
Los mantenedores suelen responder en 1 día
-
Valid legacy regex fragments are rejected before native compilationPosiblemente ocupada @MathurAditya724 la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
vercel-labs/scriptc#3035 ·
Los mantenedores suelen responder en 1 día
-
Assigning a wide Node object (process.stdout) to a narrow { write } record fails SC2002 (width-copy rules)Posiblemente ocupada @ctate la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
vercel-labs/scriptc#2949 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel-labs/scriptc
Issues similares
-
Navbar avatar and name stay stale after saving profile changesPosiblemente ocupada @alexechoi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
marmelab/atomic-crm#416 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
epam/ai-dial-react-file-manager#99 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
canonical/craft-actions#146 ·
Los mantenedores suelen responder en 2 días
-
feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
bluesky-social/social-app#12343 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lucide-icons/lucide#5165 ·
Los mantenedores suelen responder en 1 día