xref: /third_party/node/test/fixtures/source-map/babel-throw-original.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/source-map/
11cb0ef41Sopenharmony_ci/*---
21cb0ef41Sopenharmony_ciesid: prod-OptionalExpression
31cb0ef41Sopenharmony_cifeatures: [optional-chaining]
41cb0ef41Sopenharmony_ci---*/
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ciconst obj = {
71cb0ef41Sopenharmony_ci  a: {
81cb0ef41Sopenharmony_ci    b: 22
91cb0ef41Sopenharmony_ci  }
101cb0ef41Sopenharmony_ci};
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_cifunction fn () {
131cb0ef41Sopenharmony_ci  return {};
141cb0ef41Sopenharmony_ci}
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_cisetTimeout((err) => {
171cb0ef41Sopenharmony_ci  // OptionalExpression (MemberExpression OptionalChain) OptionalChain
181cb0ef41Sopenharmony_ci  if (obj?.a?.b === 22) throw Error('an exception');
191cb0ef41Sopenharmony_ci}, 5);
20

Indexes created Thu Nov 07 10:32:03 CST 2024