-
-
Notifications
You must be signed in to change notification settings - Fork 185
Lua table #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Lua table #516
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e8aff2b
LuaTable draft
hazzard993 59d25a7
Refactor and added tests
hazzard993 174f191
Fixed tripped watch file
hazzard993 600616f
Missing semicolon
hazzard993 aea50a8
Prettified
hazzard993 ce82a03
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 9a55666
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 94c8217
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 fe81a01
Cannot extend LuaTable classes
hazzard993 65fea6f
luaTable classes can only be declared
hazzard993 2d0300c
Restricted LuaTable parameter length
hazzard993 6848f11
string -> LuaTable correction
hazzard993 213a0a4
LuaTable length cannot be re-assigned
hazzard993 152bf96
Prettier
hazzard993 de40026
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 6e849e1
LuaTable interface tests
hazzard993 cc81891
LuaTables cannot be constructed with arguments
hazzard993 c51c7df
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 eb15d5c
Test splitting and more interface tests
hazzard993 54e4aac
instanceof LuaTable not allowed
hazzard993 32ad53d
Purpose in life for exception
hazzard993 781fd95
No more other methods
hazzard993 ed5c4c5
Broke down transformLuaTableCallExpression into other methods
hazzard993 3f9de1d
LuaTable -> luaTable
hazzard993 0762631
Merge remote-tracking branch 'upstream/master' into lua-table
hazzard993 49ff675
luaTables must be within an ambient context
hazzard993 8691eee
Added isAmbient and disallowed argument spreading
hazzard993 17f1f13
Unsupported method consistency
hazzard993 f3d832b
tsHelper.isDeclared is unused
hazzard993 b22c364
public -> private
hazzard993 baca079
Missed one more public
hazzard993 b75f0ef
Allowed transpileAndExecute to use ambient code
hazzard993 0756141
luaTable functional tests
hazzard993 2a48670
transpileString signature change
hazzard993 a2dd7ab
Revert util.ts changes
hazzard993 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** @luaTable */ | ||
| declare class Table<K extends {} = {}, V = any> { | ||
| public readonly length: number; | ||
| public set(key: K, value: V): void; | ||
| public get(key: K): V; | ||
| } | ||
| declare let tbl: Table; | ||
| tbl = new Table(); | ||
| tbl.set("value", 5); | ||
| const value = tbl.get("value"); | ||
| const tblLength = tbl.length; | ||
|
|
||
| /** @luaTable */ | ||
| declare interface InterfaceTable<K extends {} = {}, V = any> { | ||
| readonly length: number; | ||
| set(key: K, value: V): void; | ||
| get(key: K): V; | ||
| } | ||
|
|
||
| declare const itbl: InterfaceTable; | ||
| itbl.set("value", 5); | ||
| const ivalue = itbl.get("value"); | ||
| const ilength = tbl.length; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also should check that it's argument isn't a SpreadElement