facebookarchive/prepack

Review module ids: number vs string

Open

#852 ouverte le 28 juil. 2017

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)JavaScript (520 forks)batch import
help wantedpriority: low

Métriques du dépôt

Stars
 (14 268 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur