facebookarchive/prepack

Review module ids: number vs string

Open

#852 aperta il 28 lug 2017

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (520 fork)batch import
help wantedpriority: low

Metriche repository

Star
 (14.268 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor