运行 ❯
Node 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
const names: readonly string[] = ["Dylan"]; names.push("Jack"); // Error: Property 'push' does not exist on type 'readonly string[]'. // try removing the readonly modifier and see if it works? console.log(names);
prog.ts(2,13): error TS2339: Property 'push' does not exist on type 'readonly string[]'.