Property 'cause' does not exist on type 'Error' #7263
-
I created a new app via <script setup lang="ts">
const e = new Error("something failed");
console.log(e.cause);
</script> which leads to the following error
So it seems I'm missing a compiler option. Adding
might fix this problem. But is this the correct way to solve the compile error? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Of course, under normal circumstances error prompts are trustworthy. You just need to add |
Beta Was this translation helpful? Give feedback.
Of course, under normal circumstances error prompts are trustworthy. You just need to add
"lib": ["es2022", "dom"]
totsconfig.app.json
first.