Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate IDisposable and related utilities #7309

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
37fd9bc
@types/node
wgoehrig Oct 30, 2024
50bc0eb
Deprecate IDisposable and related utilities
wgoehrig Oct 30, 2024
d1a34a7
rush extract-api
wgoehrig Oct 30, 2024
6f7c14a
Merge branch 'master' into wbg/using
wgoehrig Oct 30, 2024
1e41fc1
Remove more uses of IDisposable
wgoehrig Oct 31, 2024
42951f3
Merge branch 'master' into wbg/using
wgoehrig Oct 31, 2024
77f3a94
extract-api
wgoehrig Oct 31, 2024
5523a13
Remove more uses of IDisposable
wgoehrig Oct 31, 2024
1c1d7aa
Fix browser tests
wgoehrig Oct 31, 2024
49c29b5
Fix typo
wgoehrig Oct 31, 2024
ea9e9b0
extract-api
wgoehrig Oct 31, 2024
c6ee104
Merge branch 'master' into wbg/using
wgoehrig Nov 13, 2024
48ef290
Merge branch 'master' into wbg/using
wgoehrig Nov 13, 2024
3d678aa
Merge branch 'master' into wbg/using
wgoehrig Dec 11, 2024
560b8c7
Update to @types/node v20.17
wgoehrig Dec 11, 2024
9384137
Fix another using
wgoehrig Dec 11, 2024
8b58a0c
Fix lint
wgoehrig Dec 11, 2024
7d48960
Clean up a couple more `using()`s
wgoehrig Dec 11, 2024
b732583
Add IDisposable deprecation to NextVersion.md
wgoehrig Dec 11, 2024
d80731b
extract-api
wgoehrig Dec 11, 2024
1279fde
rush change
wgoehrig Dec 11, 2024
2d7e37a
some cleanup & coverage
grigasp Dec 12, 2024
17e4fa3
extract-api
grigasp Dec 12, 2024
ef88ee2
Merge branch 'master' into wbg/using
grigasp Dec 16, 2024
2f06057
Remove `.only`
grigasp Dec 16, 2024
eea68b1
Merge branch 'master' into wbg/using
wgoehrig Jan 14, 2025
0f1994a
Fix lint
wgoehrig Jan 14, 2025
5c06ffb
one more lint fix
wgoehrig Jan 14, 2025
826f92b
Merge branch 'master' into wbg/using
wgoehrig Jan 15, 2025
c4d1a44
Merge branch 'master' into wbg/using
aruniverse Jan 15, 2025
28d1590
`IConnectivityInformationProvider` is internal - no need to handle th…
grigasp Jan 16, 2025
60f7678
Merge branch 'master' into wbg/using
grigasp Jan 16, 2025
bbdc44f
fix shrinkwrap
grigasp Jan 16, 2025
17b9a40
Merge branch 'master' into wbg/using
wgoehrig Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions common/api/core-backend.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1729,16 +1729,18 @@ export abstract class DriverBundleElement extends InformationContentElement {
}

// @public
export class ECDb implements IDisposable {
export class ECDb implements IDisposable, Disposable {
// @internal (undocumented)
get [_nativeDb](): IModelJsNative.ECDb;
[Symbol.dispose](): void;
constructor();
abandonChanges(): void;
// @internal
clearStatementCache(): void;
closeDb(): void;
createDb(pathName: string): void;
createQueryReader(ecsql: string, params?: QueryBinder, config?: QueryOptions): ECSqlReader;
// @deprecated (undocumented)
dispose(): void;
// @internal
getCachedStatementCount(): number;
Expand Down Expand Up @@ -1856,6 +1858,7 @@ export interface ECSqlRowArg {

// @public
export class ECSqlStatement implements IterableIterator<any>, IDisposable {
[Symbol.dispose](): void;
[Symbol.iterator](): IterableIterator<any>;
bindArray(parameter: number | string, val: any[]): void;
bindBlob(parameter: number | string, blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void;
Expand All @@ -1877,6 +1880,7 @@ export class ECSqlStatement implements IterableIterator<any>, IDisposable {
bindValue(parameter: number | string, val: any): void;
bindValues(values: any[] | object): void;
clearBindings(): void;
// @deprecated (undocumented)
dispose(): void;
getBinder(parameter: string | number): ECSqlBinder;
getColumnCount(): number;
Expand Down Expand Up @@ -5427,7 +5431,8 @@ export namespace SQLiteDb {
}

// @public
export class SqliteStatement implements IterableIterator<any>, IDisposable {
export class SqliteStatement implements IterableIterator<any>, IDisposable, Disposable {
[Symbol.dispose](): void;
[Symbol.iterator](): IterableIterator<any>;
constructor(_sql: string);
bindBlob(parameter: BindParameter, blob: Uint8Array): void;
Expand All @@ -5443,6 +5448,7 @@ export class SqliteStatement implements IterableIterator<any>, IDisposable {
bindValue(parameter: BindParameter, value: any): void;
bindValues(values: any[] | object): void;
clearBindings(): void;
// @deprecated (undocumented)
dispose(): void;
getColumnBytes(colIndex: number): number;
getColumnCount(): number;
Expand Down
16 changes: 12 additions & 4 deletions common/api/core-bentley.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,15 @@ export class DisposableList implements IDisposable {
}

// @public
export function dispose(disposable?: Disposable): undefined;

// @public @deprecated (undocumented)
export function dispose(disposable?: IDisposable): undefined;

// @public
export function disposeArray(list?: Disposable[]): undefined;

// @public @deprecated (undocumented)
export function disposeArray(list?: IDisposable[]): undefined;

// @public
Expand Down Expand Up @@ -695,7 +701,7 @@ export type Id64Set = Set<Id64String>;
// @public
export type Id64String = string;

// @public
// @public @deprecated
export interface IDisposable {
dispose(): void;
}
Expand Down Expand Up @@ -1404,9 +1410,11 @@ export class OrderedSet<T> extends ReadonlyOrderedSet<T> {
export function partitionArray<T>(array: T[], criterion: (element: T) => boolean): number;

// @public
export class PerfLogger implements IDisposable {
constructor(operation: string, metaData?: LoggingMetaData);
export class PerfLogger implements IDisposable, Disposable {
// (undocumented)
[Symbol.dispose](): void;
constructor(operation: string, metaData?: LoggingMetaData);
// @deprecated (undocumented)
dispose(): void;
}

Expand Down Expand Up @@ -1744,7 +1752,7 @@ export class UnexpectedErrors {
static setHandler(handler: OnUnexpectedError): OnUnexpectedError;
}

// @public
// @public @deprecated
export function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult;

// @public
Expand Down
4 changes: 3 additions & 1 deletion common/api/core-common.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8087,11 +8087,13 @@ export namespace RenderSchedule {
}

// @public
export abstract class RenderTexture implements IDisposable {
export abstract class RenderTexture implements IDisposable, Disposable {
[Symbol.dispose](): void;
protected constructor(type: RenderTexture.Type);
// (undocumented)
abstract get bytesUsed(): number;
compare(other: RenderTexture): number;
// @deprecated (undocumented)
abstract dispose(): void;
// (undocumented)
get isGlyph(): boolean;
Expand Down
Loading
Loading