-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
The typescript compiler implicitly loads the files for the javascript library (that gives you things like Date, Regex, Promise, etc.) and the node types. shell-api and mongodb uses the node-types. mql uses mongodb. some things use things like Promise.
(Aside: Not all of these will be used by editors in Compass, most only apply to shell autocompleter.)
In the built/bundled mongosh binary we can't have the typescript language server read files because those files won't exist on a user's system. So we have to make sure it loads the files from our in-memory "code holder".
Which means we have to read these files and store them in a module as giant strings so that they will be included in the binary.