NMV 0.8.0 - Big refactor and linting fixes

This commit is contained in:
Casper Warden
2025-01-17 23:37:54 +00:00
parent 3870861b0a
commit 53659008ac
210 changed files with 17588 additions and 18300 deletions

View File

@@ -0,0 +1,34 @@
import type { BinaryReader } from "../BinaryReader";
export class LLSDInteger
{
private _int: number;
public constructor(int: number)
{
this._int = int;
}
public static parseBinary(reader: BinaryReader): LLSDInteger
{
return new LLSDInteger(reader.readUInt32BE());
}
public valueOf(): number
{
return this._int;
}
public toJSON(): number
{
return this._int;
}
public set value(newValue: number)
{
if (!Number.isInteger(newValue)) {
throw new Error("LLSDInteger must be an integer.");
}
this._int = newValue;
}
}