---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:4]
 1 │ foo?.bar!;
   ·    ▲    ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:4]
 1 │ foo?.['bar']!;
   ·    ▲        ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:4]
 1 │ foo?.bar()!;
   ·    ▲      ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:8]
 1 │ foo.bar?.()!;
   ·        ▲   ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar)!.baz
   ·     ▲     ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar)!().baz
   ·     ▲     ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar)!
   ·     ▲     ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar)!()
   ·     ▲     ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar!)
   ·     ▲    ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.

  ⚠ typescript-eslint(no-non-null-asserted-optional-chain): non-null assertions after an optional chain expression
   ╭─[no_non_null_asserted_optional_chain.tsx:1:5]
 1 │ (foo?.bar!)()
   ·     ▲    ▲
   ╰────
  help: Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong. You should remove the non-null assertion.
