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.

貢獻者指南