Files
ValueScript/inputs/passing/const/violateWithArrayPush.ts
2023-05-31 12:18:32 +10:00

9 lines
182 B
TypeScript

//! test_output(E: TypeError{"message":"Cannot mutate this because it is const"})
export default function () {
const arr = [1, 2];
arr.push(3); // Should throw
return arr;
}