mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
46fc6e8cf6
This patch changes the lazy loading mechanism to explicitly create a "lazy" object that can be used to load modules. It makes it so that TypeScript can understand what is going on with the lazy loading. I couldn't find a solution to make the Object.define mechanism work for the global object. I briefly considered using the Object.define() method on the returned "lazy" object, as this could be typed correctly, but I felt magically accessing properties was less clear compared to calling a function that has the side effect of maybe loading a module for the first time. Differential Revision: https://phabricator.services.mozilla.com/D59208 |
||
---|---|---|
.. | ||
client | ||
docs | ||
platform | ||
server | ||
shared | ||
startup | ||
.eslintrc.js | ||
.eslintrc.mochitests.js | ||
.eslintrc.xpcshell.js | ||
CODE_OF_CONDUCT.md | ||
moz.build | ||
templates.mozbuild | ||
tsconfig.json |