iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
620 stars 210 forks source link

Deprecate IDisposable and related utilities #7309

Open wgoehrig opened 2 weeks ago

wgoehrig commented 2 weeks ago

Since TypeScript 5.2 added support for the explicit resource management feature in ECMAScript, let's deprecate IDisposable and use the new built-in Disposable instead.

pmconne commented 2 weeks ago

I want to see what output the linter produces. You've presumably introduced a ton of deprecation warnings.

I'd remove all the implements IDisposables from our code - they all implicitly implement it and you'd otherwise presumably have to suppress the lint rule at each occurrence.

wgoehrig commented 2 weeks ago

This is actually passing lint without any errors in its current state - looks like the @typescript-eslint/no-deprecated rule just doesn't check implements clauses...

pmconne commented 2 weeks ago

I'd remove implements IDisposable everywhere anyway, no reason to document implementation of an interface we discourage people from using.