• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Compiler and Runtime Subsystem
2
3The table below lists the APIs changes of the compiler and runtime subsystem in OpenHarmony 3.2 Beta3 over OpenHarmony 3.2 Beta2.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| ohos.buffer | Blob        | text(): Promise\<string>;                                                                                                                                                                                                                                                                                                                                                      | Added|
10| ohos.buffer | Blob        | slice(start?: number, end?: number, type?: string): Blob;                                                                                                                                                                                                                                                                                                                      | Added|
11| ohos.buffer | Blob        | arrayBuffer(): Promise\<ArrayBuffer>;                                                                                                                                                                                                                                                                                                                                          | Added|
12| ohos.buffer | Blob        | type: string;                                                                                                                                                                                                                                                                                                                                                                  | Added|
13| ohos.buffer | Blob        | size: number;                                                                                                                                                                                                                                                                                                                                                                  | Added|
14| ohos.buffer | Blob        | constructor(sources: string[] \| ArrayBuffer[] \| TypedArray[] \| DataView[] \| Blob[] , options?: Object);                                                                                                                                                                                                                                                                        | Added|
15| ohos.buffer | Buffer      | writeUIntLE(value: number, offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                        | Added|
16| ohos.buffer | Buffer      | writeUIntBE(value: number, offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                        | Added|
17| ohos.buffer | Buffer      | writeUInt32LE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
18| ohos.buffer | Buffer      | writeUInt32BE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
19| ohos.buffer | Buffer      | writeUInt16LE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
20| ohos.buffer | Buffer      | writeUInt16BE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
21| ohos.buffer | Buffer      | writeUInt8(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                            | Added|
22| ohos.buffer | Buffer      | writeIntLE(value : number, offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                        | Added|
23| ohos.buffer | Buffer      | writeIntBE(value: number, offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                         | Added|
24| ohos.buffer | Buffer      | writeInt32LE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
25| ohos.buffer | Buffer      | writeInt32BE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
26| ohos.buffer | Buffer      | writeInt16LE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
27| ohos.buffer | Buffer      | writeInt16BE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
28| ohos.buffer | Buffer      | writeInt8(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                             | Added|
29| ohos.buffer | Buffer      | writeFloatLE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
30| ohos.buffer | Buffer      | writeFloatBE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                          | Added|
31| ohos.buffer | Buffer      | writeDoubleLE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
32| ohos.buffer | Buffer      | writeDoubleBE(value: number, offset?: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
33| ohos.buffer | Buffer      | writeBigUInt64LE(value: bigint, offset?: number): number;                                                                                                                                                                                                                                                                                                                      | Added|
34| ohos.buffer | Buffer      | writeBigUInt64BE(value: bigint, offset?: number): number;                                                                                                                                                                                                                                                                                                                      | Added|
35| ohos.buffer | Buffer      | writeBigInt64LE(value: bigint, offset?: number): number;                                                                                                                                                                                                                                                                                                                       | Added|
36| ohos.buffer | Buffer      | writeBigInt64BE(value: bigint, offset?: number): number;                                                                                                                                                                                                                                                                                                                       | Added|
37| ohos.buffer | Buffer      | write(str: string, offset?: number, length?: number, encoding?: string): number;                                                                                                                                                                                                                                                                                               | Added|
38| ohos.buffer | Buffer      | toString(encoding?: string, start?: number, end?: number): string;                                                                                                                                                                                                                                                                                                             | Added|
39| ohos.buffer | Buffer      | toJSON(): Object;                                                                                                                                                                                                                                                                                                                                                              | Added|
40| ohos.buffer | Buffer      | swap64(): Buffer;                                                                                                                                                                                                                                                                                                                                                              | Added|
41| ohos.buffer | Buffer      | swap32(): Buffer;                                                                                                                                                                                                                                                                                                                                                              | Added|
42| ohos.buffer | Buffer      | swap16(): Buffer;                                                                                                                                                                                                                                                                                                                                                              | Added|
43| ohos.buffer | Buffer      | subarray(start?: number, end?: number): Buffer;                                                                                                                                                                                                                                                                                                                                | Added|
44| ohos.buffer | Buffer      | readUIntLE(offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                                        | Added|
45| ohos.buffer | Buffer      | readUIntBE(offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                                        | Added|
46| ohos.buffer | Buffer      | readUInt32LE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
47| ohos.buffer | Buffer      | readUInt32BE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
48| ohos.buffer | Buffer      | readUInt16LE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
49| ohos.buffer | Buffer      | readUInt16BE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
50| ohos.buffer | Buffer      | readUInt8(offset?: number): number;                                                                                                                                                                                                                                                                                                                                            | Added|
51| ohos.buffer | Buffer      | readIntLE(offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
52| ohos.buffer | Buffer      | readIntBE(offset: number, byteLength: number): number;                                                                                                                                                                                                                                                                                                                         | Added|
53| ohos.buffer | Buffer      | readInt32LE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
54| ohos.buffer | Buffer      | readInt32BE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
55| ohos.buffer | Buffer      | readInt16LE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
56| ohos.buffer | Buffer      | readInt16BE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
57| ohos.buffer | Buffer      | readInt8(offset?: number): number;                                                                                                                                                                                                                                                                                                                                             | Added|
58| ohos.buffer | Buffer      | readFloatLE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
59| ohos.buffer | Buffer      | readFloatBE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                          | Added|
60| ohos.buffer | Buffer      | readDoubleLE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
61| ohos.buffer | Buffer      | readDoubleBE(offset?: number): number;                                                                                                                                                                                                                                                                                                                                         | Added|
62| ohos.buffer | Buffer      | readBigUInt64LE(offset?: number): bigint;                                                                                                                                                                                                                                                                                                                                      | Added|
63| ohos.buffer | Buffer      | readBigUInt64BE(offset?: number): bigint;                                                                                                                                                                                                                                                                                                                                      | Added|
64| ohos.buffer | Buffer      | readBigInt64LE(offset?: number): bigint;                                                                                                                                                                                                                                                                                                                                       | Added|
65| ohos.buffer | Buffer      | readBigInt64BE(offset?: number): bigint;                                                                                                                                                                                                                                                                                                                                       | Added|
66| ohos.buffer | Buffer      | lastIndexOf(value: string \| number \| Buffer \| Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;                                                                                                                                                                                                                                                             | Added|
67| ohos.buffer | Buffer      | entries(): IterableIterator\<[number, number]>;                                                                                                                                                                                                                                                                                                                                | Added|
68| ohos.buffer | Buffer      | values(): IterableIterator\<number>;                                                                                                                                                                                                                                                                                                                                           | Added|
69| ohos.buffer | Buffer      | keys(): IterableIterator\<number>;                                                                                                                                                                                                                                                                                                                                             | Added|
70| ohos.buffer | Buffer      | indexOf(value: string \| number \| Buffer \| Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;                                                                                                                                                                                                                                                                 | Added|
71| ohos.buffer | Buffer      | includes(value: string \| number \| Buffer \| Uint8Array, byteOffset?: number, encoding?: BufferEncoding): boolean;                                                                                                                                                                                                                                                               | Added|
72| ohos.buffer | Buffer      | equals(otherBuffer: Uint8Array \| Buffer): boolean;                                                                                                                                                                                                                                                                                                                             | Added|
73| ohos.buffer | Buffer      | copy(target: Buffer \| Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;                                                                                                                                                                                                                                                                     | Added|
74| ohos.buffer | Buffer      | compare(target: Buffer \| Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 \| 0 \| 1;                                                                                                                                                                                                                                          | Added|
75| ohos.buffer | Buffer      | fill(value: string \| Buffer \| Uint8Array \| number, offset?: number, end?: number, encoding?: BufferEncoding): Buffer;                                                                                                                                                                                                                                                          | Added|
76| ohos.buffer | Buffer      | byteOffset: number;                                                                                                                                                                                                                                                                                                                                                            | Added|
77| ohos.buffer | Buffer      | buffer: ArrayBuffer;                                                                                                                                                                                                                                                                                                                                                           | Added|
78| ohos.buffer | Buffer      | length: number;                                                                                                                                                                                                                                                                                                                                                                | Added|
79| ohos.buffer | buffer      | function transcode(source: Buffer \| Uint8Array, fromEnc: string, toEnc: string): Buffer;                                                                                                                                                                                                                                                                                       | Added|
80| ohos.buffer | buffer      | function compare(buf1: Buffer \| Uint8Array, buf2: Buffer \| Uint8Array): -1 \| 0 \| 1;                                                                                                                                                                                                                                                                                            | Added|
81| ohos.buffer | buffer      | function isEncoding(encoding: string):boolean;                                                                                                                                                                                                                                                                                                                                 | Added|
82| ohos.buffer | buffer      | function isBuffer(obj: Object): boolean;                                                                                                                                                                                                                                                                                                                                       | Added|
83| ohos.buffer | buffer      | function from(array: number[]): Buffer;<br>function from(arrayBuffer: ArrayBuffer \| SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;<br>function from(buffer: Buffer \| Uint8Array): Buffer;<br>function from(object: Object, offsetOrEncoding: number \| string, length: number): Buffer;<br>function from(string: String, encoding?: BufferEncoding): Buffer; | Added|
84| ohos.buffer | buffer      | function concat(list: Buffer[] \| Uint8Array[], totalLength?: number): Buffer;                                                                                                                                                                                                                                                                                                  | Added|
85| ohos.buffer | buffer      | function byteLength(string: string \| Buffer \| TypedArray \| DataView \| ArrayBuffer \| SharedArrayBuffer, encoding?: BufferEncoding): number;                                                                                                                                                                                                                                     | Added|
86| ohos.buffer | buffer      | function allocUninitialized(size: number): Buffer;                                                                                                                                                                                                                                                                                                                             | Added|
87| ohos.buffer | buffer      | function allocUninitializedFromPool(size: number): Buffer;                                                                                                                                                                                                                                                                                                                     | Added|
88| ohos.buffer | buffer      | function alloc(size: number, fill?: string \| Buffer \| number, encoding?: BufferEncoding): Buffer;                                                                                                                                                                                                                                                                              | Added|
89| ohos.util   | TextDecoder | decodeWithStream(input: Uint8Array, options?: { stream?: boolean }): string;                                                                                                                                                                                                                                                                                                   | Added|
90| ohos.util   | util        | function parseUUID(uuid: string): Uint8Array;                                                                                                                                                                                                                                                                                                                                  | Added|
91| ohos.util   | util        | function randomBinaryUUID(entropyCache?: boolean): Uint8Array;                                                                                                                                                                                                                                                                                                                 | Added|
92| ohos.util   | util        | function randomUUID(entropyCache?: boolean): string;                                                                                                                                                                                                                                                                                                                           | Added|
93| ohos.worker | DedicatedWorkerGlobalScope | postMessage(messageObject: Object, transfer: Transferable[]): void;<br>postMessage(messageObject: Object, options?: PostMessageOptions): void;<br>postMessage(messageObject: Object, transfer: ArrayBuffer[]): void; | Deprecated|
94