From a877e5a6126f8435e59315ddf5e82ee9cade0f2c Mon Sep 17 00:00:00 2001 From: DonIsaac <22823424+DonIsaac@users.noreply.github.com> Date: Sun, 25 Aug 2024 01:02:51 +0000 Subject: [PATCH] test(linter/no-unused-vars): ensure type annotations on property accessors are considered used (#5183) --- .../src/rules/eslint/no_unused_vars/tests/oxc.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/oxc_linter/src/rules/eslint/no_unused_vars/tests/oxc.rs b/crates/oxc_linter/src/rules/eslint/no_unused_vars/tests/oxc.rs index b15a3b2a7..6e672a431 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unused_vars/tests/oxc.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unused_vars/tests/oxc.rs @@ -904,6 +904,13 @@ fn test_type_references() { export const API_PERMISSIONS = {} as const; ", + " + type Foo = 'foo' | 'bar'; + export class Bar { + accessor x: Foo + accessor y!: Foo + } + ", ]; let fail = vec![