facebookarchive/prepack

Review module ids: number vs string

Open

#852 创建于 2017年7月28日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)JavaScript (520 fork)batch import
help wantedpriority: low

仓库指标

Star
 (14,268 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南