Support third party framework import statements
See original GitHub issueIn frameworks like RoStrap, there is a custom “LoadLibrary” function. In RoStrap’s case, it eliminates the need for absolute paths between your code and handles replication of shared code in the background.
In a perfect world, it would be nice for import { something } from "Aurora" to compile to Resources:LoadLibrary("Aurora"), where “Aurora.ts” is the name of one of your own files.
Even if a compromise is required, it would be nice to support emitting import statements that are compatible with frameworks while not losing type information about the module.
In RoStrap’s case, relative file-based import statements should still use require, only the named module syntax should use Resources:LoadLibrary.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Conditionally import a framework (… | Apple Developer Forums
Is there any way to conditionally import a framework in Swift based on runtime iOS version? In particular, I have an app with...
Read more >How to import 3rd party framework privately for your Swift ...
1 Answer 1 ... Swift doesn't support internal/private imports at the moment. All of your imports are forwarded to anyone using your framework....
Read more >Auto import | IntelliJ IDEA Documentation - JetBrains
In the Settings/Preferences dialog ( Ctrl+Alt+S ), click Editor | General | Auto Import. Select the Add unambiguous imports on the fly checkbox ......
Read more >How do I use an external framework in my project? - Using Swift
I haven't been able to use any third-party frameworks in an Xcode project ... to them with an import statement results in "module...
Read more >Adding a third party framework inside a first party ... - Medium
To access third party public functions, we normally import the third party framework module. The error 'No such module' is a common compile ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We decided that support for third party frameworks should live in modules, not the compiler. Adding support for each and every framework into the compiler would be a futile effort, but modules can and should be able to do everything that is necessary, such as dynamically generated imports via metatables + a .d.ts file.
@Dog2puppy This would be done by creating an npm module. I’ll post a guide for how to make these soon.