Skip to content

Conversation

@jeparlefrancais
Copy link
Contributor

@jeparlefrancais jeparlefrancais commented Dec 23, 2025

This PR adds support for read and write access modifiers in table types.

export type Object = {
    read name: string,
}
  • add entry to the changelog

@github-actions
Copy link

Coverage after merging table-type-prop-modifier into main will be

87.23%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ast_converter.rs88.46%100%91.07%88.32%1013, 1037, 1057–1059, 1080, 1095–1097, 1145, 1149–1152, 1185, 1205, 1220, 1245, 1283, 1302–1304, 1349, 1383, 1398, 1414–1416, 1426, 1431–1433, 1448–1449, 1468, 1599–1601, 1662–1664, 1715–1717, 1741–1742, 1779–1781, 1809–1811, 1815–1817, 1880–1882, 1907–1909, 1916–1918, 1936–1938, 1962–1964, 2034, 2039–2041, 2061, 2067–2069, 2074–2076, 2101–2103, 2123, 218, 2180–2182, 219–220, 2206–2209, 2239–2241, 2247–2249, 2252–2254, 2316–2318, 2330–2332, 2336–2338, 235, 2352–2353, 2359, 236, 2360, 237, 2374–2375, 2403, 2486–2488, 2516–2518, 2539–2541, 2571–2574, 2589–2590, 2593, 2617–2619, 2631–2633, 265, 2653–2655, 266–267, 2710–2712, 2744, 3083–3090, 3092–3093, 3095–3097, 3101–3112, 3121, 3123–3126, 3130–3133, 3138, 3164–3166, 3177–3179, 3197–3199, 488–490, 494–496, 543, 604, 619–621, 656–659, 666, 680, 695–697, 701–703, 718–721, 724, 733–735, 776–777, 787–789, 795–797, 840, 927, 931–933, 954
   parser.rs88.55%100%94.12%87.72%23–24, 31–32, 528–530, 533, 73–77, 89
src/frontend
   configuration.rs87.71%100%86.96%87.84%142–156, 158–159, 196–200, 59–61, 72–75
src/generator
   dense.rs87.93%100%93.33%87.39%1009–1015, 1029–1031, 1049–1053, 1061, 1070–1071, 1076, 1082, 1091–1099, 1116, 1138, 1151–1154, 1158–1161, 159–160, 162, 176–177, 179, 253–265, 267–273, 275–276, 287–289, 368, 417, 50, 507, 51–53, 55, 57–59, 61, 614–616, 62–63, 65–68, 685, 69, 704, 80, 887, 932, 949, 976–983
   mod.rs98.65%100%100%98.53%389, 405, 409
   readable.rs97.16%100%99.03%96.99%1122, 1173–1177, 1229, 1282–1284, 1351, 1378, 1408, 180, 185–186, 190, 203–204, 209, 214, 232–233, 413, 46, 48–51, 53, 655–656
   token_based.rs93.17%100%95.34%92.96%1002–1006, 1025–1026, 1039–1040, 1061–1062, 1076–1078, 1101–1102, 1111–1113, 1132–1133, 1142–1144, 1195–1200, 1354, 139–140, 1424, 1461–1469, 156–157, 1580–1582, 1614–1623, 1667, 169–170, 1725, 191–192, 212–214, 2181–2182, 2241–2245, 2465, 2469, 2482, 254, 306–310, 380–381, 387, 399, 459–460, 482–483, 499–500, 542, 630–631, 664–665, 733–734, 775–776, 824–828, 845, 89, 891–893, 964–965, 974–975, 982, 997
src/nodes/types
   table.rs73.73%100%79.69%72.49%166, 171, 176–181, 196–198, 254–257, 262, 267, 272–277, 316–318, 34, 349–353, 355–356, 363, 368–372, 374, 388–389, 39, 397–398, 421–422, 44–45, 455–459, 46, 460–463, 47–49, 514–516, 529–533, 543–545, 577–586
src/rules
   append_text_comment.rs82.68%100%87.50%82.21%102–105, 123–124, 167–172, 201–203, 32–38, 49, 51–54
   call_parens.rs100%100%100%100%
   compute_expression.rs91.58%100%100%90.12%21, 37, 53, 69, 74, 82, 89, 92
   convert_index_to_field.rs100%100%100%100%
   convert_luau_number.rs100%100%100%100%
   convert_square_root_call.rs92.78%100%92.31%92.86%30, 50–51, 60–62
   empty_do.rs100%100%100%100%
   filter_early_return.rs96.72%100%100%96.08%22–23
   global_function_to_assign.rs100%100%100%100%
   group_local.rs95.60%100%100%94.94%38–40, 44
   inject_value.rs88.30%100%93.55%87.80%180, 187, 195–204, 206–215, 220–226, 232, 240–242, 74, 78–79
   method_def.rs100%100%100%100%
   no_local_function.rs100%100%100%100%
   remove_assertions.rs97.09%100%100%96.67%40, 52
   remove_comments.rs94.09%100%90.67%95.21%293, 333, 414, 491–493
   remove_compound_assign.rs97.32%100%95.83%97.50%272–274, 55, 83
   remove_continue.rs98.74%100%100%98.48%127, 75
   remove_debug_profiling.rs97.44%100%100%97.06%52
   remove_floor_division.rs88.54%100%100%86.75%100–108, 47–48
   remove_if_expression.rs100%100%100%100%
   remove_interpolated_string.rs95.03%100%100%94.55%209–216
   remove_method_call.rs98.41%100%100%98.15%38
   remove_nil_declarations.rs100%100%100%100%
   remove_spaces.rs99.20%100%100%98.98%249
   remove_types.rs100%100%100%100%
   remove_unused_variable.rs96.82%100%100%96.45%146, 177–180, 182–183
   replace_referenced_tokens.rs96.09%100%96.43%96%167–169, 178, 254–257
   shift_token_line.rs95.78%100%96.23%95.65%167–169, 264–267, 91
src/rules/convert_require
   mod.rs92.02%100%90.48%92.25%115–117, 140, 150–151, 47, 70–71

@jeparlefrancais jeparlefrancais merged commit 8e134da into main Dec 23, 2025
6 checks passed
@jeparlefrancais jeparlefrancais deleted the table-type-prop-modifier branch December 23, 2025 16:17
Stefanuk12 added a commit to Stefanuk12/darklua that referenced this pull request Dec 28, 2025
* Fix `inject_global_value` rule with default value (seaofvoices#324)

* Release 0.17.3 (seaofvoices#325)

* Add support for property modifiers in table types (seaofvoices#332)

This PR adds support for `read` and `write` access modifiers in 
table types.

Example:
```
export type Object = {
    read name: string,
}
```

---------

Co-authored-by: jeparlefrancais <35781636+jeparlefrancais@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants