Skip to content

Change all boolean to bool? #1645

Closed
@nuintun

Description

@nuintun

setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void {
if (
(byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)
) throw new RangeError(E_INDEXOUTOFRANGE);
store<i32>(this.dataStart + <usize>byteOffset, littleEndian ? value : bswap<i32>(value));
}

const littleEndian: bool = true;
const view = new DataView(new Uint8Array(4096));

// ts(2345) error
view .setInt16(0, 0xffff, littleEndian);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions