Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 Typescript Declaration File noUnusedVariable #3169

Closed
1 task done
ZachHaber opened this issue Sep 6, 2022 · 2 comments · Fixed by #3322
Closed
1 task done

🐛 Typescript Declaration File noUnusedVariable #3169

ZachHaber opened this issue Sep 6, 2022 · 2 comments · Fixed by #3322
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Milestone

Comments

@ZachHaber
Copy link

ZachHaber commented Sep 6, 2022

Environment information

Rome Extension: v0.14.0
No Rome CLI installed globally or locally,

VSCode Env Info:
Version: 1.71.0 (system setup)
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-01T07:36:10.600Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

What happened?

When viewing a manually created .d.ts file, noUnusedVariables erroneously triggers.

For reference, this is setting up an environment that's outside the normal browser environment (Adobe Acrobat), so the default typescript lib files don't apply in a lot of cases.

declare const ANSB_None: number;

interface MapConstructor {
	new <K, V>(
		iterable?:
			| Iterable<readonly [K, V] | LegacyIterator<readonly [K, V]>>
			| null,
	): Map<K, V>;
}

declare class StopIteration {
	private constructor();
}

Playground Link (Note: there's no declaration file option in the playground)

Expected result

It should not flag these declarations as unused.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@ZachHaber ZachHaber added the S-To triage Status: user report of a possible bug that needs to be triaged label Sep 6, 2022
@MichaReiser
Copy link
Contributor

@xunilrj would you mind taking a look at this

@github-actions
Copy link

This issue is stale because it has been open 14 days with no activity.

@ematipico ematipico removed the S-Stale label Sep 21, 2022
@ematipico ematipico added this to the 0.10.0 milestone Sep 21, 2022
@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Sep 21, 2022
@ematipico ematipico modified the milestones: 0.10.0, 10.0.0 Oct 3, 2022
@xunilrj xunilrj moved this to Done in Rome 2022 Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants