Export default and export equals#670
Conversation
Perryvw
left a comment
There was a problem hiding this comment.
This is a little more than I expected, I'll continue reviewing later.
Codecov Report
@@ Coverage Diff @@
## master #670 +/- ##
==========================================
+ Coverage 94.13% 94.26% +0.13%
==========================================
Files 16 16
Lines 4091 4133 +42
Branches 937 947 +10
==========================================
+ Hits 3851 3896 +45
+ Misses 206 203 -3
Partials 34 34
Continue to review full report at Codecov.
|
| } | ||
| } | ||
|
|
||
| protected getAbsoluteImportPath(relativePath: string): string { |
There was a problem hiding this comment.
Any reason you moved these? I think they were located correctly in this file.
There was a problem hiding this comment.
I mainly moved them to tsHelper as it was logic that transpileAndExecuteProjectReturningMainExport needed.
The methods were not available to convert TypeScript path strings to Lua import and export path strings without constructing a LuaTransformer only to convert a string using those methods.
Closes #606
As far as I know this PR should make TypeScriptToLua support all import and export statements. This doesn't include call expression
import()(Promise).Highlighted below are the new statements that can be written.
Moved some path resolving logic over to tsHelper to allow it to be used by testing utilities. Using this I've made a new utility to functionally test module imports and exports.