thebaselab / codeapp

Building a full-fledged code editor for iPad
https://code.thebaselab.com
MIT License
3k stars 207 forks source link

Typescript is unable to get definitions from imported files and node modules #1177

Open Andexter8 opened 6 days ago

Andexter8 commented 6 days ago

when importing things from other files and/or node modules, it only gets the base definition of the property, but not any of the properties of the import. For example let's say that you imported the "@minecraft/server" module as the namespace mcServer with import * as mcServer from "@minecraft/server". Then, you start trying to reference it, the autocomplete does show the mcServer variable and defines it as import mcServer, however when you try to access one of its properties, there are no definitions, it basically treats it as the any type. Another example would be if you imported the server class from @minecraft/server, you would see the property in autocomplete, but when trying to access one of its properties (ex. system.run), they have no type definitions and the system class is treated like the any type. The same thing happens with other imported typescript files.