Skip to content

Commit abcb782

Browse files
gimi-andersmeta-codesync[bot]
authored andcommitted
Add 'es2022.error' to TypeScript lib options (#56968)
Summary: This adds support for the `cause` parameter, which Hermes supports since 2021. The motivation is to be able to use `cause` on errors without getting TypeScript errors. ## Changelog: ```text [GENERAL] [ADDED] - Add TypeScript support for Error `cause` property ``` Pull Request resolved: #56968 Test Plan: I've tested this by adding `es2022.error` to my local TypeScript lib options, and that makes the type checking work 🎉 Reviewed By: cortinico Differential Revision: D106364666 Pulled By: fabriziocucci fbshipit-source-id: 42b9663dfac7b65371addd08fc821f073ac36ce4
1 parent d7b5314 commit abcb782

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/typescript-config/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"es2021.string",
1818
"es2021.weakref",
1919
"es2022.array",
20+
"es2022.error",
2021
"es2022.object",
2122
"es2022.string"
2223
],

0 commit comments

Comments
 (0)