mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 23:48:02 -05:00
23 lines
283 B
TypeScript
23 lines
283 B
TypeScript
//! test_output([[],["item"]])
|
|
|
|
export default function () {
|
|
return [
|
|
test(true),
|
|
test(false),
|
|
];
|
|
}
|
|
|
|
function test(shouldThrow: boolean) {
|
|
let x = [];
|
|
|
|
try {
|
|
x.push("item");
|
|
|
|
if (shouldThrow) {
|
|
throw new Error("boom");
|
|
}
|
|
} catch {}
|
|
|
|
return x;
|
|
}
|