facebookarchive/prepack

Review module ids: number vs string

Open

#852 aberto em 28 de jul. de 2017

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (520 forks)batch import
help wantedpriority: low

Métricas do repositório

Stars
 (14.268 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

The module system actually uses them interchangeably, assuming that numbers get converted to strings. However, in modules.js, we currently keep them around as number | string, as use that as indices into maps and elements of sets, where numbers and strings are getting distinguished.

We should systematically convert all modules ids to strings, and then consider replacing some of those Maps with plain Object.

Guia do colaborador