Repository: denoland/deno
File: cli/tsc/dts/lib.deno.ns.d.ts (TypeScript)

Code before:
    getInt16(offset?: number): number;
    /** Gets an unsigned 32-bit integer at the specified byte offset from the
     * pointer. */
    getUint32(offset?: number): number;
    /** Gets a signed 32-bit integer at the specified byte offset from the
     * pointer. */
    getInt32(offset?: number): number;
    /** Gets an unsigned 64-bit integer at the specified byte offset from the
     * pointer. */
    getBigUint64(offset?: number): bigint;
    /** Gets a signed 64-bit integer at the specified byte offset from the
     * pointer. */
    getBigInt64(offset?: number): bigint;
    /** Gets a signed 32-bit float at the specified byte offset from the
     * pointer. */
    getFloat32(offset?: number): number;
    /** Gets a signed 64-bit float at the specified byte offset from the
     * pointer. */
    getFloat64(offset?: number): number;
    /** Gets a pointer at the specified byte offset from the pointer */
    getPointer<T = unknown>(offset?: number): PointerValue<T>;
    /** Gets a UTF-8 encoded string at the specified byte offset until 0 byte.
     *
     * Returned string doesn't include U+0000 character.
     *
     * Invalid UTF-8 causes U+FFFD character(s) in returned string.
     *
     * Similar to:
     * ```ts
     * function getCString(this: Deno.UnsafePointerView, offset: number = 0) {
     *   let byteLength = 0;
     *   while (this.getUint8(offset + byteLength)) {
     *     ++byteLength;
     *   }
     *   return new TextDecoder().decode(this.getArrayBuffer(byteLength, offset));
     * }
     * ```
     */
    getCString(offset?: number): string;
    /** Gets a UTF-8 encoded string at the specified byte offset from the specified pointer until 0 byte.
     *
     * Returned string doesn't include U+0000 character.
     *
     * Invalid UTF-8 causes U+FFFD character(s) in returned string.
     *
     * Similar to:
     * ```ts
     * function getCString(pointer: Deno.PointerObject, offset: number = 0) {
     *   const view = new Deno.UnsafePointerView(pointer);
     *   let byteLength = 0;
     *   while (view.getUint8(offset + byteLength)) {

Review comment (suggestion):
```suggestion
     * Invalid UTF-8 characters are replaced with U+FFFD character in the returned string.
```

Code after:
    getInt16(offset?: number): number;
    /** Gets an unsigned 32-bit integer at the specified byte offset from the
     * pointer. */
    getUint32(offset?: number): number;
    /** Gets a signed 32-bit integer at the specified byte offset from the
     * pointer. */
    getInt32(offset?: number): number;
    /** Gets an unsigned 64-bit integer at the specified byte offset from the
     * pointer. */
    getBigUint64(offset?: number): bigint;
    /** Gets a signed 64-bit integer at the specified byte offset from the
     * pointer. */
    getBigInt64(offset?: number): bigint;
    /** Gets a signed 32-bit float at the specified byte offset from the
     * pointer. */
    getFloat32(offset?: number): number;
    /** Gets a signed 64-bit float at the specified byte offset from the
     * pointer. */
    getFloat64(offset?: number): number;
    /** Gets a pointer at the specified byte offset from the pointer */
    getPointer<T = unknown>(offset?: number): PointerValue<T>;
    /** Gets a UTF-8 encoded string at the specified byte offset until 0 byte.
     *
     * Returned string doesn't include U+0000 character.
     *
     * Invalid UTF-8 characters are replaced with U+FFFD character in the returned string. */
    getCString(offset?: number): string;
    /** Gets a UTF-8 encoded string at the specified byte offset from the specified pointer until 0 byte.
     *
     * Returned string doesn't include U+0000 character.
     *
     * Invalid UTF-8 characters are replaced with U+FFFD character in the returned string. */
    static getCString(pointer: PointerObject, offset?: number): string;
    /** Gets an `ArrayBuffer` of length `byteLength` at the specified byte
     * offset from the pointer. */
    getArrayBuffer(byteLength: number, offset?: number): ArrayBuffer;
    /** Gets an `ArrayBuffer` of length `byteLength` at the specified byte
     * offset from the specified pointer. */
    static getArrayBuffer(
      pointer: PointerObject,
      byteLength: number,
      offset?: number,
    ): ArrayBuffer;
    /** Copies the memory of the pointer into a typed array.
     *
     * Length is determined from the typed array's `byteLength`.
     *
     * Also takes optional byte offset from the pointer. */
    copyInto(destination: BufferSource, offset?: number): void;
    /** Copies the memory of the specified pointer into a typed array.
     *