Skip to content

Commit 21e4472

Browse files
add test case
1 parent 973d118 commit 21e4472

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/oxc_linter/src/rules/typescript/array_type.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,10 @@ const instance = new MyClass<number>(42);",
973973
// https://github.com/oxc-project/oxc/issues/12605
974974
("let a: factories.User[] = [];", Some(serde_json::json!([{"default":"array-simple"}]))),
975975
("let a: factories.TT.User[] = [];", Some(serde_json::json!([{"default":"array-simple"}]))),
976+
(
977+
"let z: readonly factories.User[] = [];",
978+
Some(serde_json::json!([{"readonly":"array-simple"}])),
979+
),
976980
];
977981

978982
let fail = vec![

0 commit comments

Comments
 (0)