forked from JohnnyMorganz/StyLua
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep parentheses around compound type in table indexer (JohnnyMorganz…
…#837) * Add test case * Don't remove parens in table indexer * Update snapshots * Update changelog
- Loading branch information
1 parent
a5ca6a4
commit 987c489
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 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 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,4 @@ | ||
--- https://github.com/JohnnyMorganz/StyLua/issues/828 | ||
type foo = { | ||
[("bar" | "baz")]: any, | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/snapshots/tests__luau@types_parentheses_table_indexer.lua.snap
This file contains 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,10 @@ | ||
--- | ||
source: tests/tests.rs | ||
expression: format(&contents) | ||
input_file: tests/inputs-luau/types_parentheses_table_indexer.lua | ||
--- | ||
--- https://github.com/JohnnyMorganz/StyLua/issues/828 | ||
type foo = { | ||
[("bar" | "baz")]: any, | ||
} | ||
|