@itwin/core-bentley 5.0.0-dev.40 → 5.0.0-dev.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Change Log - @itwin/core-bentley
2
2
 
3
- This log was last generated on Mon, 13 Jan 2025 14:09:29 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 24 Jan 2025 08:05:17 GMT and should not be manually modified.
4
+
5
+ ## 4.10.6
6
+ Fri, 24 Jan 2025 08:02:40 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.10.5
11
+ Tue, 21 Jan 2025 21:56:45 GMT
12
+
13
+ _Version update only_
4
14
 
5
15
  ## 4.10.4
6
16
  Mon, 13 Jan 2025 14:06:43 GMT
@@ -24,15 +24,12 @@ export declare class ByteStream {
24
24
  * ArrayBuffer. If `bytes` represents only a **sub-range** of the underlying buffer's data, the results will be unexpected unless the optional `subView`
25
25
  * argument is supplied, with correct offset and length.
26
26
  *
27
- * For both of the above reasons, prefer to use [[fromUint8Array]].
28
- * @deprecated in 3.x. Use [[fromUint8Array]] or [[fromArrayBuffer]].
27
+ * For both of the above reasons, this constructor is private, and [[fromUint8Array]] or [[fromArrayBuffer]] should be used to create a ByteStream.
29
28
  */
30
- constructor(buffer: ArrayBuffer | SharedArrayBuffer, subView?: {
31
- byteOffset: number;
32
- byteLength: number;
33
- });
29
+ private constructor();
34
30
  /** Construct a new ByteStream for the range of bytes represented by `bytes`, which may be a subset of the range of bytes
35
31
  * represented by the underlying ArrayBuffer. The read position will be set to the beginning of the range of bytes.
32
+ * @param bytes The Uint8Array from which data is to be extracted.
36
33
  */
37
34
  static fromUint8Array(bytes: Uint8Array): ByteStream;
38
35
  /** Construct a new ByteStream with the read position set to the beginning.
@@ -80,22 +77,6 @@ export declare class ByteStream {
80
77
  readId64(): Id64String;
81
78
  /** Read an unsigned 24-bit integer from the current read position and advance by 3 bytes. */
82
79
  readUint24(): number;
83
- /** @deprecated in 3.x. use [[readUint8]]. */
84
- get nextUint8(): number;
85
- /** @deprecated in 3.x. use [[readUint16]]. */
86
- get nextUint16(): number;
87
- /** @deprecated in 3.x. use [[readUint32]]. */
88
- get nextUint32(): number;
89
- /** @deprecated in 3.x. use [[readInt32]]. */
90
- get nextInt32(): number;
91
- /** @deprecated in 3.x. use [[readFloat32]]. */
92
- get nextFloat32(): number;
93
- /** @deprecated in 3.x. use [[readFloat64]]. */
94
- get nextFloat64(): number;
95
- /** @deprecated in 3.x. use [[readId64]]. */
96
- get nextId64(): Id64String;
97
- /** @deprecated in 3.x. use [[readUint32]]. */
98
- get nextUint24(): number;
99
80
  /** Read the specified number of bytes beginning at the current read position into a Uint8Array and advance by the specified number of byte.
100
81
  * @param numBytes The number of bytes to read.
101
82
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ByteStream.d.ts","sourceRoot":"","sources":["../../src/ByteStream.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AAExC;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,OAAO,CAAa;IAE5B;;;;;;;;;;;;;OAaG;gBACgB,MAAM,EAAE,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAUhH;;OAEG;WACW,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU;IAK3D;;;OAGG;WACW,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,UAAU;IAIxI,yCAAyC;IACzC,IAAW,MA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CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAQxC,sEAAsE;IAC/D,KAAK,IAAI,IAAI;IAEpB,0FAA0F;IACnF,SAAS,IAAI,MAAM;IAC1B,6FAA6F;IACtF,UAAU,IAAI,MAAM;IAC3B,6FAA6F;IACtF,UAAU,IAAI,MAAM;IAC3B,0FAA0F;IACnF,SAAS,IAAI,MAAM;IAC1B,iGAAiG;IAC1F,WAAW,IAAI,MAAM;IAC5B,iGAAiG;IAC1F,WAAW,IAAI,MAAM;IAC5B,wIAAwI;IACjI,QAAQ,IAAI,UAAU;IAC7B,6FAA6F;IACtF,UAAU,IAAI,MAAM;IAE3B;;OAEG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU;IAM9C,qGAAqG;IAC9F,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;IAI/D,0HAA0H;IACnH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW;IAOnD,0CAA0C;IAC1C,IAAW,WAAW,IAAI,WAAW,GAAG,iBAAiB,CAA8B;IAEvF,OAAO,CAAC,IAAI;CAKb"}
@@ -29,8 +29,7 @@ class ByteStream {
29
29
  * ArrayBuffer. If `bytes` represents only a **sub-range** of the underlying buffer's data, the results will be unexpected unless the optional `subView`
30
30
  * argument is supplied, with correct offset and length.
31
31
  *
32
- * For both of the above reasons, prefer to use [[fromUint8Array]].
33
- * @deprecated in 3.x. Use [[fromUint8Array]] or [[fromArrayBuffer]].
32
+ * For both of the above reasons, this constructor is private, and [[fromUint8Array]] or [[fromArrayBuffer]] should be used to create a ByteStream.
34
33
  */
35
34
  constructor(buffer, subView) {
36
35
  this._curPos = 0;
@@ -45,17 +44,18 @@ class ByteStream {
45
44
  }
46
45
  /** Construct a new ByteStream for the range of bytes represented by `bytes`, which may be a subset of the range of bytes
47
46
  * represented by the underlying ArrayBuffer. The read position will be set to the beginning of the range of bytes.
47
+ * @param bytes The Uint8Array from which data is to be extracted.
48
48
  */
49
49
  static fromUint8Array(bytes) {
50
50
  const { byteOffset, byteLength } = bytes;
51
- return new ByteStream(bytes.buffer, { byteOffset, byteLength }); // eslint-disable-line @typescript-eslint/no-deprecated
51
+ return new ByteStream(bytes.buffer, { byteOffset, byteLength });
52
52
  }
53
53
  /** Construct a new ByteStream with the read position set to the beginning.
54
54
  * @param buffer The underlying buffer from which data is to be extracted.
55
55
  * @param subView If defined, specifies the subset of the underlying buffer's data to use.
56
56
  */
57
57
  static fromArrayBuffer(buffer, subView) {
58
- return new ByteStream(buffer, subView); // eslint-disable-line @typescript-eslint/no-deprecated
58
+ return new ByteStream(buffer, subView);
59
59
  }
60
60
  /** The number of bytes in this stream */
61
61
  get length() {
@@ -113,22 +113,6 @@ class ByteStream {
113
113
  readId64() { return Id_1.Id64.fromUint32Pair(this.readUint32(), this.readUint32()); }
114
114
  /** Read an unsigned 24-bit integer from the current read position and advance by 3 bytes. */
115
115
  readUint24() { return this.readUint8() | (this.readUint8() << 8) | (this.readUint8() << 16); }
116
- /** @deprecated in 3.x. use [[readUint8]]. */
117
- get nextUint8() { return this.readUint8(); }
118
- /** @deprecated in 3.x. use [[readUint16]]. */
119
- get nextUint16() { return this.readUint16(); }
120
- /** @deprecated in 3.x. use [[readUint32]]. */
121
- get nextUint32() { return this.readUint32(); }
122
- /** @deprecated in 3.x. use [[readInt32]]. */
123
- get nextInt32() { return this.readInt32(); }
124
- /** @deprecated in 3.x. use [[readFloat32]]. */
125
- get nextFloat32() { return this.readFloat32(); }
126
- /** @deprecated in 3.x. use [[readFloat64]]. */
127
- get nextFloat64() { return this.readFloat64(); }
128
- /** @deprecated in 3.x. use [[readId64]]. */
129
- get nextId64() { return this.readId64(); }
130
- /** @deprecated in 3.x. use [[readUint32]]. */
131
- get nextUint24() { return this.readUint24(); }
132
116
  /** Read the specified number of bytes beginning at the current read position into a Uint8Array and advance by the specified number of byte.
133
117
  * @param numBytes The number of bytes to read.
134
118
  */
@@ -1 +1 @@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,UAAU,CAAC,CAAC;QAC9F,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0CAA0C;IAC1C,IAAW,WAAW,KAAsC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,IAAI,CAAC,QAAgB,EAAE,IAAgC;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA9JD,gCA8JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\nimport { assert } from \"./Assert\";\nimport { Id64, Id64String } from \"./Id\";\n\n/** Allows the contents of an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\n * to be consumed sequentially using methods to extract\n * data of a particular type from the bytes beginning at the current read position.\n * Methods and properties beginning with 'read' and taking no arguments consume data at the current read position and advance it\n * by the size of the data read. The read position can also be directly adjusted by the caller.\n * @public\n */\nexport class ByteStream {\n private readonly _view: DataView;\n private readonly _byteOffset: number;\n private _curPos: number = 0;\n\n /** Construct a new ByteStream with the read position set to the beginning.\n * @param buffer The underlying buffer from which data is to be extracted.\n * @param subView If defined, specifies the subset of the underlying buffer's data to use.\n * This constructor is subject to two common mistakes:\n *\n * 1. Given `bytes: Uint8Array`, `new ByteStream(bytes)` will compile but at run-time will produce an error asserting that\n * the DataView constructor requires an ArrayBuffer. The correct usage is `new ByteStream(bytes.buffer)`.\n * 2. Given `bytes: Uint8Array`, `new ByteStream(bytes.buffer)` creates a stream for the entire range of bytes represented by the underlying\n * ArrayBuffer. If `bytes` represents only a **sub-range** of the underlying buffer's data, the results will be unexpected unless the optional `subView`\n * argument is supplied, with correct offset and length.\n *\n * For both of the above reasons, prefer to use [[fromUint8Array]].\n * @deprecated in 3.x. Use [[fromUint8Array]] or [[fromArrayBuffer]].\n */\n public constructor(buffer: ArrayBuffer | SharedArrayBuffer, subView?: { byteOffset: number, byteLength: number }) {\n if (undefined !== subView) {\n this._view = new DataView(buffer, subView.byteOffset, subView.byteLength);\n this._byteOffset = subView.byteOffset;\n } else {\n this._view = new DataView(buffer);\n this._byteOffset = 0;\n }\n }\n\n /** Construct a new ByteStream for the range of bytes represented by `bytes`, which may be a subset of the range of bytes\n * represented by the underlying ArrayBuffer. The read position will be set to the beginning of the range of bytes.\n */\n public static fromUint8Array(bytes: Uint8Array): ByteStream {\n const { byteOffset, byteLength } = bytes;\n return new ByteStream(bytes.buffer, { byteOffset, byteLength }); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** Construct a new ByteStream with the read position set to the beginning.\n * @param buffer The underlying buffer from which data is to be extracted.\n * @param subView If defined, specifies the subset of the underlying buffer's data to use.\n */\n public static fromArrayBuffer(buffer: ArrayBuffer | SharedArrayBuffer, subView?: { byteOffset: number, byteLength: number }): ByteStream {\n return new ByteStream(buffer, subView); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** The number of bytes in this stream */\n public get length(): number {\n return this._view.byteLength;\n }\n\n /** The number of bytes remaining to be read, from [[curPos]] to the end of the stream. */\n public get remainingLength(): number {\n return this.length - this.curPos;\n }\n\n /** Returns true if the current read position has been advanced past the end of the stream. This generally indicates that an attempt was made to read more data than is available.\n * @see [[isAtTheEnd]]\n */\n public get isPastTheEnd(): boolean {\n return this.curPos > this.length;\n }\n\n /** Returns true if the current read position has advanced precisely to the end of the stream, indicating all of the data has been consumed.\n * @see [[isPastTheEnd]].\n */\n public get isAtTheEnd(): boolean {\n return this.curPos === this.length;\n }\n\n /** The current read position as an index into the stream of bytes. */\n public get curPos(): number { return this._curPos; }\n public set curPos(pos: number) {\n this._curPos = pos;\n assert(!this.isPastTheEnd);\n }\n\n /** Adds the specified number of bytes to the current read position */\n public advance(numBytes: number): boolean {\n this.curPos = (this.curPos + numBytes);\n return !this.isPastTheEnd;\n }\n\n /** Subtracts the specified number of bytes from the current read position */\n public rewind(numBytes: number): boolean {\n if (this.curPos - numBytes < 0)\n return false;\n\n this.curPos = this.curPos - numBytes;\n return true;\n }\n\n /** Resets the current read position to the beginning of the stream */\n public reset(): void { this.curPos = 0; }\n\n /** Read a unsigned 8-bit integer from the current read position and advance by 1 byte. */\n public readUint8(): number { return this.read(1, (view) => view.getUint8(this.curPos)); }\n /** Read an unsigned 16-bit integer from the current read position and advance by 2 bytes. */\n public readUint16(): number { return this.read(2, (view) => view.getUint16(this.curPos, true)); }\n /** Read an unsigned 32-bit integer from the current read position and advance by 4 bytes. */\n public readUint32(): number { return this.read(4, (view) => view.getUint32(this.curPos, true)); }\n /** Read a signed 32-bit integer from the current read position and advance by 4 bytes. */\n public readInt32(): number { return this.read(4, (view) => view.getInt32(this.curPos, true)); }\n /** Read a 32-bit floating point number from the current read position and advance by 4 bytes. */\n public readFloat32(): number { return this.read(4, (view) => view.getFloat32(this.curPos, true)); }\n /** Read a 64-bit floating point number from the current read position and advance by 8 bytes. */\n public readFloat64(): number { return this.read(8, (view) => view.getFloat64(this.curPos, true)); }\n /** Read an unsigned 64-bit integer from the current read position, advance by 8 bytes, and return the 64-bit value as an Id64String. */\n public readId64(): Id64String { return Id64.fromUint32Pair(this.readUint32(), this.readUint32()); }\n /** Read an unsigned 24-bit integer from the current read position and advance by 3 bytes. */\n public readUint24(): number { return this.readUint8() | (this.readUint8() << 8) | (this.readUint8() << 16); }\n\n /** @deprecated in 3.x. use [[readUint8]]. */\n public get nextUint8(): number { return this.readUint8(); }\n /** @deprecated in 3.x. use [[readUint16]]. */\n public get nextUint16(): number { return this.readUint16(); }\n /** @deprecated in 3.x. use [[readUint32]]. */\n public get nextUint32(): number { return this.readUint32(); }\n /** @deprecated in 3.x. use [[readInt32]]. */\n public get nextInt32(): number { return this.readInt32(); }\n /** @deprecated in 3.x. use [[readFloat32]]. */\n public get nextFloat32(): number { return this.readFloat32(); }\n /** @deprecated in 3.x. use [[readFloat64]]. */\n public get nextFloat64(): number { return this.readFloat64(); }\n /** @deprecated in 3.x. use [[readId64]]. */\n public get nextId64(): Id64String { return this.readId64(); }\n /** @deprecated in 3.x. use [[readUint32]]. */\n public get nextUint24(): number { return this.readUint24(); }\n\n /** Read the specified number of bytes beginning at the current read position into a Uint8Array and advance by the specified number of byte.\n * @param numBytes The number of bytes to read.\n */\n public nextBytes(numBytes: number): Uint8Array {\n const bytes = new Uint8Array(this.arrayBuffer, this.curPos + this._byteOffset, numBytes);\n this.advance(numBytes);\n return bytes;\n }\n\n /** Read the specified number of bytes at the specified offset without changing the read position. */\n public readBytes(readPos: number, numBytes: number): Uint8Array {\n return new Uint8Array(this.arrayBuffer, readPos + this._byteOffset, numBytes);\n }\n\n /** Read the specified number of unsigned 32-bit integers from the current read position and advance the read position. */\n public nextUint32s(numUint32s: number): Uint32Array {\n const numBytes = numUint32s * 4;\n const uint32s = new Uint32Array(this.arrayBuffer, this.curPos + this._byteOffset, numUint32s);\n this.advance(numBytes);\n return uint32s;\n }\n\n /** Returns the underlying array buffer */\n public get arrayBuffer(): ArrayBuffer | SharedArrayBuffer { return this._view.buffer; }\n\n private read(numBytes: number, read: (view: DataView) => number) {\n const result = read(this._view);\n this.advance(numBytes);\n return result;\n }\n}\n"]}
1
+ {"version":3,"file":"ByteStream.js","sourceRoot":"","sources":["../../src/ByteStream.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qCAAkC;AAClC,6BAAwC;AAExC;;;;;;GAMG;AACH,MAAa,UAAU;IAKrB;;;;;;;;;;;;OAYG;IACH,YAAoB,MAAuC,EAAE,OAAoD;QAfzG,YAAO,GAAW,CAAC,CAAC;QAgB1B,IAAI,SAAS,KAAK,OAAO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AA0H;IACnH,WAAW,CAAC,UAAkB;QACnC,MAAM,QAAQ,GAAG,UAAU,GAAG,CAAC,CAAC;QAChC,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC9F,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0CAA0C;IAC1C,IAAW,WAAW,KAAsC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,IAAI,CAAC,QAAgB,EAAE,IAAgC;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA7ID,gCA6IC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\nimport { assert } from \"./Assert\";\nimport { Id64, Id64String } from \"./Id\";\n\n/** Allows the contents of an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\n * to be consumed sequentially using methods to extract\n * data of a particular type from the bytes beginning at the current read position.\n * Methods and properties beginning with 'read' and taking no arguments consume data at the current read position and advance it\n * by the size of the data read. The read position can also be directly adjusted by the caller.\n * @public\n */\nexport class ByteStream {\n private readonly _view: DataView;\n private readonly _byteOffset: number;\n private _curPos: number = 0;\n\n /** Construct a new ByteStream with the read position set to the beginning.\n * @param buffer The underlying buffer from which data is to be extracted.\n * @param subView If defined, specifies the subset of the underlying buffer's data to use.\n * This constructor is subject to two common mistakes:\n *\n * 1. Given `bytes: Uint8Array`, `new ByteStream(bytes)` will compile but at run-time will produce an error asserting that\n * the DataView constructor requires an ArrayBuffer. The correct usage is `new ByteStream(bytes.buffer)`.\n * 2. Given `bytes: Uint8Array`, `new ByteStream(bytes.buffer)` creates a stream for the entire range of bytes represented by the underlying\n * ArrayBuffer. If `bytes` represents only a **sub-range** of the underlying buffer's data, the results will be unexpected unless the optional `subView`\n * argument is supplied, with correct offset and length.\n *\n * For both of the above reasons, this constructor is private, and [[fromUint8Array]] or [[fromArrayBuffer]] should be used to create a ByteStream.\n */\n private constructor(buffer: ArrayBuffer | SharedArrayBuffer, subView?: { byteOffset: number, byteLength: number }) {\n if (undefined !== subView) {\n this._view = new DataView(buffer, subView.byteOffset, subView.byteLength);\n this._byteOffset = subView.byteOffset;\n } else {\n this._view = new DataView(buffer);\n this._byteOffset = 0;\n }\n }\n\n /** Construct a new ByteStream for the range of bytes represented by `bytes`, which may be a subset of the range of bytes\n * represented by the underlying ArrayBuffer. The read position will be set to the beginning of the range of bytes.\n * @param bytes The Uint8Array from which data is to be extracted.\n */\n public static fromUint8Array(bytes: Uint8Array): ByteStream {\n const { byteOffset, byteLength } = bytes;\n return new ByteStream(bytes.buffer, { byteOffset, byteLength }); \n }\n\n /** Construct a new ByteStream with the read position set to the beginning.\n * @param buffer The underlying buffer from which data is to be extracted.\n * @param subView If defined, specifies the subset of the underlying buffer's data to use.\n */\n public static fromArrayBuffer(buffer: ArrayBuffer | SharedArrayBuffer, subView?: { byteOffset: number, byteLength: number }): ByteStream {\n return new ByteStream(buffer, subView); \n }\n\n /** The number of bytes in this stream */\n public get length(): number {\n return this._view.byteLength;\n }\n\n /** The number of bytes remaining to be read, from [[curPos]] to the end of the stream. */\n public get remainingLength(): number {\n return this.length - this.curPos;\n }\n\n /** Returns true if the current read position has been advanced past the end of the stream. This generally indicates that an attempt was made to read more data than is available.\n * @see [[isAtTheEnd]]\n */\n public get isPastTheEnd(): boolean {\n return this.curPos > this.length;\n }\n\n /** Returns true if the current read position has advanced precisely to the end of the stream, indicating all of the data has been consumed.\n * @see [[isPastTheEnd]].\n */\n public get isAtTheEnd(): boolean {\n return this.curPos === this.length;\n }\n\n /** The current read position as an index into the stream of bytes. */\n public get curPos(): number { return this._curPos; }\n public set curPos(pos: number) {\n this._curPos = pos;\n assert(!this.isPastTheEnd);\n }\n\n /** Adds the specified number of bytes to the current read position */\n public advance(numBytes: number): boolean {\n this.curPos = (this.curPos + numBytes);\n return !this.isPastTheEnd;\n }\n\n /** Subtracts the specified number of bytes from the current read position */\n public rewind(numBytes: number): boolean {\n if (this.curPos - numBytes < 0)\n return false;\n\n this.curPos = this.curPos - numBytes;\n return true;\n }\n\n /** Resets the current read position to the beginning of the stream */\n public reset(): void { this.curPos = 0; }\n\n /** Read a unsigned 8-bit integer from the current read position and advance by 1 byte. */\n public readUint8(): number { return this.read(1, (view) => view.getUint8(this.curPos)); }\n /** Read an unsigned 16-bit integer from the current read position and advance by 2 bytes. */\n public readUint16(): number { return this.read(2, (view) => view.getUint16(this.curPos, true)); }\n /** Read an unsigned 32-bit integer from the current read position and advance by 4 bytes. */\n public readUint32(): number { return this.read(4, (view) => view.getUint32(this.curPos, true)); }\n /** Read a signed 32-bit integer from the current read position and advance by 4 bytes. */\n public readInt32(): number { return this.read(4, (view) => view.getInt32(this.curPos, true)); }\n /** Read a 32-bit floating point number from the current read position and advance by 4 bytes. */\n public readFloat32(): number { return this.read(4, (view) => view.getFloat32(this.curPos, true)); }\n /** Read a 64-bit floating point number from the current read position and advance by 8 bytes. */\n public readFloat64(): number { return this.read(8, (view) => view.getFloat64(this.curPos, true)); }\n /** Read an unsigned 64-bit integer from the current read position, advance by 8 bytes, and return the 64-bit value as an Id64String. */\n public readId64(): Id64String { return Id64.fromUint32Pair(this.readUint32(), this.readUint32()); }\n /** Read an unsigned 24-bit integer from the current read position and advance by 3 bytes. */\n public readUint24(): number { return this.readUint8() | (this.readUint8() << 8) | (this.readUint8() << 16); }\n\n /** Read the specified number of bytes beginning at the current read position into a Uint8Array and advance by the specified number of byte.\n * @param numBytes The number of bytes to read.\n */\n public nextBytes(numBytes: number): Uint8Array {\n const bytes = new Uint8Array(this.arrayBuffer, this.curPos + this._byteOffset, numBytes);\n this.advance(numBytes);\n return bytes;\n }\n\n /** Read the specified number of bytes at the specified offset without changing the read position. */\n public readBytes(readPos: number, numBytes: number): Uint8Array {\n return new Uint8Array(this.arrayBuffer, readPos + this._byteOffset, numBytes);\n }\n\n /** Read the specified number of unsigned 32-bit integers from the current read position and advance the read position. */\n public nextUint32s(numUint32s: number): Uint32Array {\n const numBytes = numUint32s * 4;\n const uint32s = new Uint32Array(this.arrayBuffer, this.curPos + this._byteOffset, numUint32s);\n this.advance(numBytes);\n return uint32s;\n }\n\n /** Returns the underlying array buffer */\n public get arrayBuffer(): ArrayBuffer | SharedArrayBuffer { return this._view.buffer; }\n\n private read(numBytes: number, read: (view: DataView) => number) {\n const result = read(this._view);\n this.advance(numBytes);\n return result;\n }\n}\n"]}
@@ -14,6 +14,7 @@
14
14
  *
15
15
  * Implementations of IDisposable tend to be more "low-level" types. The disposal of such types is often handled on your behalf.
16
16
  * However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.
17
+ * @deprecated in 5.0 Use builtin Disposable type instead.
17
18
  * @public
18
19
  */
19
20
  export interface IDisposable {
@@ -24,9 +25,15 @@ export interface IDisposable {
24
25
  }
25
26
  /**
26
27
  * A type guard that checks whether the given argument implements `IDisposable` interface
28
+ * @deprecated in 5.0 Use isDisposable instead.
27
29
  * @public
28
30
  */
29
31
  export declare function isIDisposable(obj: unknown): obj is IDisposable;
32
+ /**
33
+ * A type guard that checks whether the given argument implements `Disposable` interface
34
+ * @public
35
+ */
36
+ export declare function isDisposable(obj: unknown): obj is Disposable;
30
37
  /** Convenience function for disposing of a disposable object that may be undefined.
31
38
  * This is primarily used to simplify implementations of [[IDisposable.dispose]].
32
39
  * As a simple example:
@@ -45,18 +52,29 @@ export declare function isIDisposable(obj: unknown): obj is IDisposable;
45
52
  * @returns undefined
46
53
  * @public
47
54
  */
55
+ export declare function dispose(disposable?: Disposable): undefined;
56
+ /**
57
+ * @deprecated in 5.0 Use builtin Disposable type instead.
58
+ * @public
59
+ */
48
60
  export declare function dispose(disposable?: IDisposable): undefined;
49
61
  /** Disposes of and empties a list of disposable objects.
50
62
  * @param list The list of disposable objects.
51
63
  * @returns undefined
52
64
  * @public
53
65
  */
66
+ export declare function disposeArray(list?: Disposable[]): undefined;
67
+ /**
68
+ * @deprecated in 5.0 Use builtin Disposable type instead.
69
+ * @public
70
+ */
54
71
  export declare function disposeArray(list?: IDisposable[]): undefined;
55
72
  /** A 'using' function which is a substitution for .NET's using statement. It makes sure that 'dispose'
56
73
  * is called on the resource no matter if the func returns or throws. If func returns, the return value
57
74
  * of this function is equal to return value of func. If func throws, this function also throws (after
58
75
  * disposing the resource).
59
76
  * @public
77
+ * @deprecated in 5.0 Use `using` declarations instead.
60
78
  */
61
79
  export declare function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult;
62
80
  /** A definition of function which may be called to dispose an object
@@ -1 +1 @@
1
- {"version":3,"file":"Disposable.d.ts","sourceRoot":"","sources":["../../src/Disposable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAE9D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,SAAS,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAS5D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO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E,WAAW,EAAE,GAAG,SAAS,CAAC;AAgB9D;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,GAAG,OAAO,CAkB/G;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAQrC;;GAEG;AACH,qBAAa,cAAe,YAAW,WAAW;IAChD,OAAO,CAAC,YAAY,CAAgB;IAEpC,iCAAiC;gBACrB,WAAW,GAAE,KAAK,CAAC,WAAW,GAAG,WAAW,CAAM;IAO9D,OAAO,CAAC,YAAY;IAIpB,uCAAuC;IAChC,GAAG,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW;IAOhD,oCAAoC;IAC7B,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAM5C,uCAAuC;IAChC,OAAO,IAAI,IAAI;CAIvB"}
@@ -9,49 +9,46 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.DisposableList = void 0;
11
11
  exports.isIDisposable = isIDisposable;
12
+ exports.isDisposable = isDisposable;
12
13
  exports.dispose = dispose;
13
14
  exports.disposeArray = disposeArray;
14
15
  exports.using = using;
16
+ /* eslint-disable @typescript-eslint/no-deprecated */
17
+ Symbol.dispose ??= Symbol("Symbol.dispose");
18
+ Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
15
19
  /**
16
20
  * A type guard that checks whether the given argument implements `IDisposable` interface
21
+ * @deprecated in 5.0 Use isDisposable instead.
17
22
  * @public
18
23
  */
19
24
  function isIDisposable(obj) {
20
25
  return !!obj && (obj instanceof Object) && !!obj.dispose && (typeof obj.dispose === "function");
21
26
  }
22
- /** Convenience function for disposing of a disposable object that may be undefined.
23
- * This is primarily used to simplify implementations of [[IDisposable.dispose]].
24
- * As a simple example:
25
- * ```ts
26
- * class Disposable implements IDisposable {
27
- * public member1?: DisposableType1;
28
- * public member2?: DisposableType2;
29
- *
30
- * public dispose() {
31
- * this.member1 = dispose(this.member1); // If member1 is defined, dispose of it and set it to undefined.
32
- * this.member2 = dispose(this.member2); // Likewise for member2.
33
- * }
34
- * }
35
- * ```
36
- * @param disposable The object to be disposed of.
37
- * @returns undefined
27
+ /**
28
+ * A type guard that checks whether the given argument implements `Disposable` interface
38
29
  * @public
39
30
  */
31
+ function isDisposable(obj) {
32
+ return !!obj && (obj instanceof Object) && !!obj[Symbol.dispose] && (typeof obj[Symbol.dispose] === "function");
33
+ }
40
34
  function dispose(disposable) {
41
- if (undefined !== disposable)
42
- disposable.dispose();
35
+ if (undefined !== disposable) {
36
+ if (Symbol.dispose in disposable)
37
+ disposable[Symbol.dispose]();
38
+ else
39
+ disposable.dispose();
40
+ }
43
41
  return undefined;
44
42
  }
45
- /** Disposes of and empties a list of disposable objects.
46
- * @param list The list of disposable objects.
47
- * @returns undefined
48
- * @public
49
- */
50
43
  function disposeArray(list) {
51
44
  if (undefined === list)
52
45
  return undefined;
53
- for (const entry of list)
54
- dispose(entry);
46
+ for (const entry of list) {
47
+ if (Symbol.dispose in entry)
48
+ entry[Symbol.dispose]();
49
+ else
50
+ entry.dispose();
51
+ }
55
52
  list.length = 0;
56
53
  return undefined;
57
54
  }
@@ -60,6 +57,7 @@ function disposeArray(list) {
60
57
  * of this function is equal to return value of func. If func throws, this function also throws (after
61
58
  * disposing the resource).
62
59
  * @public
60
+ * @deprecated in 5.0 Use `using` declarations instead.
63
61
  */
64
62
  function using(resources, func) {
65
63
  if (!Array.isArray(resources))
@@ -1 +1 @@
1
- {"version":3,"file":"Disposable.js","sourceRoot":"","sources":["../../src/Disposable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4BH,sCAEC;AAoBD,0BAIC;AAOD,oCASC;AAQD,sBAkBC;AAxED;;;GAGG;AACH,SAAgB,aAAa,CAAC,GAAY;I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AI,wBAAwB;YAC1B,SAAS,EAAE,CAAC;IAChB,CAAC;AACH,CAAC;AAOD,MAAM,cAAc;IAElB,YAAY,WAAuB,IAAI,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC;IAClE,OAAO,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,MAAa,cAAc;IAGzB,iCAAiC;IACjC,YAAY,cAAgD,EAAE;QAC5D,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACjC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,CAA4B;QAC/C,OAAQ,CAAiB,CAAC,OAAO,KAAK,SAAS,CAAC;IAClD,CAAC;IAED,uCAAuC;IAChC,GAAG,CAAC,UAAqC;QAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;;YAEnC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,oCAAoC;IAC7B,MAAM,CAAC,UAAuB;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,CAAC,KAAK,GAAG;YACZ,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,uCAAuC;IAChC,OAAO;QACZ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,YAAY;YACxC,UAAU,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACF;AAnCD,wCAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\n/** Interface adopted by a type which has deterministic cleanup logic.\n * For example:\n * - Most rendering-related types, such as [[RenderGraphic]] and [[Viewport]], own WebGL resources which must be explicitly released when no longer needed.\n * - Some low-level objects like [[ECDb]] own native types defined in C++ code which must be explicitly released when no longer needed.\n *\n * A similar concept exists in languages like C++ (implemented as \"destructors\") and C# (\"IDisposable\").\n * However, because TypeScript and Javascript lack any built-in support for deterministic destruction, it is up to the programmer to ensure dispose() is called appropriately.\n * Failure to do so may result in memory leaks or leaking of other resources.\n *\n * IDisposable tends to be contagious; that is, if a type has members which implement IDisposable, that type should also implement IDisposable to dispose of those members.\n *\n * Implementations of IDisposable tend to be more \"low-level\" types. The disposal of such types is often handled on your behalf.\n * However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.\n * @public\n */\nexport interface IDisposable {\n /** Disposes of any resources owned by this object.\n * @note The object is generally considered unusable after it has been disposed of.\n */\n dispose(): void;\n}\n\n/**\n * A type guard that checks whether the given argument implements `IDisposable` interface\n * @public\n */\nexport function isIDisposable(obj: unknown): obj is IDisposable {\n return !!obj && (obj instanceof Object) && !!(obj as IDisposable).dispose && (typeof (obj as IDisposable).dispose === \"function\");\n}\n\n/** Convenience function for disposing of a disposable object that may be undefined.\n * This is primarily used to simplify implementations of [[IDisposable.dispose]].\n * As a simple example:\n * ```ts\n * class Disposable implements IDisposable {\n * public member1?: DisposableType1;\n * public member2?: DisposableType2;\n *\n * public dispose() {\n * this.member1 = dispose(this.member1); // If member1 is defined, dispose of it and set it to undefined.\n * this.member2 = dispose(this.member2); // Likewise for member2.\n * }\n * }\n * ```\n * @param disposable The object to be disposed of.\n * @returns undefined\n * @public\n */\nexport function dispose(disposable?: IDisposable): undefined {\n if (undefined !== disposable)\n disposable.dispose();\n return undefined;\n}\n\n/** Disposes of and empties a list of disposable objects.\n * @param list The list of disposable objects.\n * @returns undefined\n * @public\n */\nexport function disposeArray(list?: IDisposable[]): undefined {\n if (undefined === list)\n return undefined;\n\n for (const entry of list)\n dispose(entry);\n\n list.length = 0;\n return undefined;\n}\n\n/** A 'using' function which is a substitution for .NET's using statement. It makes sure that 'dispose'\n * is called on the resource no matter if the func returns or throws. If func returns, the return value\n * of this function is equal to return value of func. If func throws, this function also throws (after\n * disposing the resource).\n * @public\n */\nexport function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult {\n if (!Array.isArray(resources))\n return using([resources], func);\n\n const doDispose = () => resources.forEach((disposable) => disposable.dispose());\n let shouldDisposeImmediately = true;\n\n try {\n const result = func(...resources);\n if (result instanceof Promise) {\n shouldDisposeImmediately = false;\n result.then(doDispose, doDispose);\n }\n return result;\n } finally {\n if (shouldDisposeImmediately)\n doDispose();\n }\n}\n\n/** A definition of function which may be called to dispose an object\n * @public\n */\nexport type DisposeFunc = () => void;\n\nclass FuncDisposable implements IDisposable {\n private _disposeFunc: () => void;\n constructor(disposeFunc: () => void) { this._disposeFunc = disposeFunc; }\n public dispose() { this._disposeFunc(); }\n}\n\n/** A disposable container of disposable objects.\n * @public\n */\nexport class DisposableList implements IDisposable {\n private _disposables: IDisposable[];\n\n /** Creates a disposable list. */\n constructor(disposables: Array<IDisposable | DisposeFunc> = []) {\n this._disposables = [];\n disposables.forEach((disposable) => {\n this.add(disposable);\n });\n }\n\n private isDisposable(x: IDisposable | DisposeFunc): x is IDisposable {\n return (x as IDisposable).dispose !== undefined;\n }\n\n /** Register an object for disposal. */\n public add(disposable: IDisposable | DisposeFunc) {\n if (this.isDisposable(disposable))\n this._disposables.push(disposable);\n else\n this._disposables.push(new FuncDisposable(disposable));\n }\n\n /** Unregister disposable object. */\n public remove(disposable: IDisposable): void {\n const idx = this._disposables.indexOf(disposable);\n if (-1 !== idx)\n this._disposables.splice(idx, 1);\n }\n\n /** Disposes all registered objects. */\n public dispose(): void {\n for (const disposable of this._disposables)\n disposable.dispose();\n }\n}\n"]}
1
+ {"version":3,"file":"Disposable.js","sourceRoot":"","sources":["../../src/Disposable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAkCH,sCAEC;AAMD,oCAEC;AA0BD,0BAQC;AAaD,oCAaC;AASD,sBAkBC;AAjID,qDAAqD;AACpD,MAAc,CAAC,OAAO,KAAK,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACpD,MAAc,CAAC,YAAY,KAAK,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAyB/D;;;;GAIG;AACH,SAAgB,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,MAAM,CAAC,IAAI,CAAC,CAAE,GAAmB,CAAC,OAAO,IAAI,CAAC,OAAQ,GAAmB,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC;AACpI,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,GAAY;IACvC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,MAAM,CAAC,IAAI,CAAC,CAAE,GAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAQ,GAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;AAClJ,CAAC;AA0BD,SAAgB,OAAO,CAAC,UAAqC;IAC3D,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,OAAO,IAAI,UAAU;YAC9B,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;;YAE7B,UAAU,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAaD,SAAgB,YAAY,CAAC,IAAmC;IAC9D,IAAI,SAAS,KAAK,IAAI;QACpB,OAAO,SAAS,CAAC;IAEnB,KAAK,MAAM,KAAK,IAAI,IAAI,EAA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C,UAAU,EAAE,EAAE;YACjC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,CAA4B;QAC/C,OAAQ,CAAiB,CAAC,OAAO,KAAK,SAAS,CAAC;IAClD,CAAC;IAED,uCAAuC;IAChC,GAAG,CAAC,UAAqC;QAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;;YAEnC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,oCAAoC;IAC7B,MAAM,CAAC,UAAuB;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,CAAC,KAAK,GAAG;YACZ,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,uCAAuC;IAChC,OAAO;QACZ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,YAAY;YACxC,UAAU,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACF;AAnCD,wCAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n(Symbol as any).dispose ??= Symbol(\"Symbol.dispose\");\n(Symbol as any).asyncDispose ??= Symbol(\"Symbol.asyncDispose\");\n\n/** Interface adopted by a type which has deterministic cleanup logic.\n * For example:\n * - Most rendering-related types, such as [[RenderGraphic]] and [[Viewport]], own WebGL resources which must be explicitly released when no longer needed.\n * - Some low-level objects like [[ECDb]] own native types defined in C++ code which must be explicitly released when no longer needed.\n *\n * A similar concept exists in languages like C++ (implemented as \"destructors\") and C# (\"IDisposable\").\n * However, because TypeScript and Javascript lack any built-in support for deterministic destruction, it is up to the programmer to ensure dispose() is called appropriately.\n * Failure to do so may result in memory leaks or leaking of other resources.\n *\n * IDisposable tends to be contagious; that is, if a type has members which implement IDisposable, that type should also implement IDisposable to dispose of those members.\n *\n * Implementations of IDisposable tend to be more \"low-level\" types. The disposal of such types is often handled on your behalf.\n * However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.\n * @deprecated in 5.0 Use builtin Disposable type instead.\n * @public\n */\nexport interface IDisposable {\n /** Disposes of any resources owned by this object.\n * @note The object is generally considered unusable after it has been disposed of.\n */\n dispose(): void;\n}\n\n/**\n * A type guard that checks whether the given argument implements `IDisposable` interface\n * @deprecated in 5.0 Use isDisposable instead.\n * @public\n */\nexport function isIDisposable(obj: unknown): obj is IDisposable {\n return !!obj && (obj instanceof Object) && !!(obj as IDisposable).dispose && (typeof (obj as IDisposable).dispose === \"function\");\n}\n\n/**\n * A type guard that checks whether the given argument implements `Disposable` interface\n * @public\n */\nexport function isDisposable(obj: unknown): obj is Disposable {\n return !!obj && (obj instanceof Object) && !!(obj as Disposable)[Symbol.dispose] && (typeof (obj as Disposable)[Symbol.dispose] === \"function\");\n}\n\n/** Convenience function for disposing of a disposable object that may be undefined.\n * This is primarily used to simplify implementations of [[IDisposable.dispose]].\n * As a simple example:\n * ```ts\n * class Disposable implements IDisposable {\n * public member1?: DisposableType1;\n * public member2?: DisposableType2;\n *\n * public dispose() {\n * this.member1 = dispose(this.member1); // If member1 is defined, dispose of it and set it to undefined.\n * this.member2 = dispose(this.member2); // Likewise for member2.\n * }\n * }\n * ```\n * @param disposable The object to be disposed of.\n * @returns undefined\n * @public\n */\nexport function dispose(disposable?: Disposable): undefined;\n/**\n * @deprecated in 5.0 Use builtin Disposable type instead.\n * @public\n */\nexport function dispose(disposable?: IDisposable): undefined; // eslint-disable-line @typescript-eslint/unified-signatures\nexport function dispose(disposable?: Disposable | IDisposable): undefined {\n if (undefined !== disposable) {\n if (Symbol.dispose in disposable)\n disposable[Symbol.dispose]();\n else\n disposable.dispose();\n }\n return undefined;\n}\n\n/** Disposes of and empties a list of disposable objects.\n * @param list The list of disposable objects.\n * @returns undefined\n * @public\n */\nexport function disposeArray(list?: Disposable[]): undefined;\n/**\n * @deprecated in 5.0 Use builtin Disposable type instead.\n * @public\n */\nexport function disposeArray(list?: IDisposable[]): undefined; // eslint-disable-line @typescript-eslint/unified-signatures\nexport function disposeArray(list?: Disposable[] | IDisposable[]): undefined {\n if (undefined === list)\n return undefined;\n\n for (const entry of list) {\n if (Symbol.dispose in entry)\n entry[Symbol.dispose]();\n else\n entry.dispose();\n }\n\n list.length = 0;\n return undefined;\n}\n\n/** A 'using' function which is a substitution for .NET's using statement. It makes sure that 'dispose'\n * is called on the resource no matter if the func returns or throws. If func returns, the return value\n * of this function is equal to return value of func. If func throws, this function also throws (after\n * disposing the resource).\n * @public\n * @deprecated in 5.0 Use `using` declarations instead.\n */\nexport function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult {\n if (!Array.isArray(resources))\n return using([resources], func);\n\n const doDispose = () => resources.forEach((disposable) => disposable.dispose());\n let shouldDisposeImmediately = true;\n\n try {\n const result = func(...resources);\n if (result instanceof Promise) {\n shouldDisposeImmediately = false;\n result.then(doDispose, doDispose);\n }\n return result;\n } finally {\n if (shouldDisposeImmediately)\n doDispose();\n }\n}\n\n/** A definition of function which may be called to dispose an object\n * @public\n */\nexport type DisposeFunc = () => void;\n\nclass FuncDisposable implements IDisposable {\n private _disposeFunc: () => void;\n constructor(disposeFunc: () => void) { this._disposeFunc = disposeFunc; }\n public dispose() { this._disposeFunc(); }\n}\n\n/** A disposable container of disposable objects.\n * @public\n */\nexport class DisposableList implements IDisposable {\n private _disposables: IDisposable[];\n\n /** Creates a disposable list. */\n constructor(disposables: Array<IDisposable | DisposeFunc> = []) {\n this._disposables = [];\n disposables.forEach((disposable) => {\n this.add(disposable);\n });\n }\n\n private isDisposable(x: IDisposable | DisposeFunc): x is IDisposable {\n return (x as IDisposable).dispose !== undefined;\n }\n\n /** Register an object for disposal. */\n public add(disposable: IDisposable | DisposeFunc) {\n if (this.isDisposable(disposable))\n this._disposables.push(disposable);\n else\n this._disposables.push(new FuncDisposable(disposable));\n }\n\n /** Unregister disposable object. */\n public remove(disposable: IDisposable): void {\n const idx = this._disposables.indexOf(disposable);\n if (-1 !== idx)\n this._disposables.splice(idx, 1);\n }\n\n /** Disposes all registered objects. */\n public dispose(): void {\n for (const disposable of this._disposables)\n disposable.dispose();\n }\n}\n"]}
package/lib/cjs/Id.d.ts CHANGED
@@ -276,10 +276,6 @@ export declare class TransientIdSequence {
276
276
  * Each call to [[getNext]] increments this by 1 and uses it as the local Id of the generated [[Id64String]].
277
277
  */
278
278
  get currentLocalId(): number;
279
- /** Generate and return the next transient Id64String in the sequence.
280
- * @deprecated in 3.x. Use [[getNext]].
281
- */
282
- get next(): Id64String;
283
279
  /** Generate and return the next transient Id64String in the sequence. */
284
280
  getNext(): Id64String;
285
281
  /** Preview the transient Id64String that will be returned by the next call to [[getNext]].
@@ -1 +1 @@
1
- {"version":3,"file":"Id.d.ts","sourceRoot":"","sources":["../../src/Id.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAiCvD;;;;;;;;GAQG;AACH,yBAAiB,IAAI,CAAC;IACpB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Id() {
607
607
  return this._localId;
608
608
  }
609
- /** Generate and return the next transient Id64String in the sequence.
610
- * @deprecated in 3.x. Use [[getNext]].
611
- */
612
- get next() {
613
- return this.getNext();
614
- }
615
609
  /** Generate and return the next transient Id64String in the sequence. */
616
610
  getNext() {
617
611
  return Id64.fromLocalAndBriefcaseIds(++this._localId, 0xffffff);