Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Alternatives to `preferNullPrototype`

Abierto
#24 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
javascript

Línea de trabajo

Start with issue #24 and compare the proposed names against its stated constraints around Arrays, Objects, JSON import attributes, and allowed values. Done means the naming and scope question has a decided direction; no file or test entry point is mentioned in the payload.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

preferNullPrototype is the current key name for the following reasons:

  1. nullPrototype was passed over because it is only the non-Array Objects that get null prototypes; Arrays do not.
  2. nullPrototypeForObjects or similar was passed over because Arrays technically are Objects so this still has the same problem as (1)

While advancing this proposal to Stage 2.7, I think the committee was split on (1) but generally agreed that (2) is a bit too pedantic. So we are reconsidering names that somehow mention Object -- we heard the following in committee:

nullPrototypeObjects: boolean
nullObjectPrototype: boolean

We also heard the following:

objectPrototype: null | ???

This option opens the door do doing things like objectPrototype: MyThing.prototype where MyThing is some user-defined class. This would not be possible in import attributes, assuming we add this key to JSON import attributes. It also would expand the scope of this proposal considerably. So assuming we are not going to do that, null and undefined (which would lead to the default Object.prototype) would be the only permissible values for objectPrototype.

I think my current weak preference is for nullPrototypeObjects.

Lenguaje dominante
HTML
Estrellas
52
Forks
4
Merge medio
17 h 35 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tc39/proposal-json-parseimmutable

Todos los issues de tc39/proposal-json-parseimmutable

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.