Skip to content

Commit

Permalink
0.7.24 - Upgrade typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper Warden committed Aug 17, 2024
1 parent 358af87 commit b55af06
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 38 deletions.
2 changes: 1 addition & 1 deletion lib/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import Timer = NodeJS.Timer;
export class Bot
{
private loginParams: LoginParameters;
private ping: Timer | null = null;
private ping: NodeJS.Timeout | null = null;
private pingNumber = 0;
private lastSuccessfulPing = 0;
private circuitSubscription: Subscription | null = null;
Expand Down
5 changes: 2 additions & 3 deletions lib/classes/Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { BulkUpdateInventoryMessage } from './messages/BulkUpdateInventory';
import { InventoryItem } from './InventoryItem';
import { AgentDataUpdateMessage } from './messages/AgentDataUpdate';
import { InventoryLibrary } from '../enums/InventoryLibrary';
import Timer = NodeJS.Timer;

export class Agent
{
Expand All @@ -47,7 +46,7 @@ export class Agent
hasVoice: boolean;
isModerator: boolean
}>,
timeout?: Timer
timeout?: NodeJS.Timeout
}>();
controlFlags: ControlFlags = 0;
openID: {
Expand Down Expand Up @@ -90,7 +89,7 @@ export class Agent
attachments: Wearable[];
serialNumber: number
};
agentUpdateTimer: Timer | null = null;
agentUpdateTimer: NodeJS.Timeout | null = null;
estateManager = false;

appearanceComplete = false;
Expand Down
12 changes: 5 additions & 7 deletions lib/classes/Circuit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import { Utils } from './Utils';

import * as Long from 'long';

import Timer = NodeJS.Timer;

export class Circuit
{
secureSessionID: UUID;
Expand All @@ -39,12 +37,12 @@ export class Circuit
awaitingAck: {
[key: number]: {
packet: Packet,
timeout: Timer,
timeout: NodeJS.Timeout,
sent: number
}
} = {};
receivedPackets: {
[key: number]: Timer
[key: number]: NodeJS.Timeout
} = {};
active = false;

Expand Down Expand Up @@ -179,7 +177,7 @@ export class Circuit
return new Promise<Buffer>((resolve, reject) =>
{
let subscription: null | Subscription = null;
let timeout: Timer | null = null;
let timeout: NodeJS.Timeout | null = null;
const receivedChunks: { [key: number]: Buffer } = {};
const resetTimeout = function(): void
{
Expand Down Expand Up @@ -326,7 +324,7 @@ export class Circuit
return new Promise<void>((resolve, reject) =>
{
const handleObj: {
timeout: Timer | null,
timeout: NodeJS.Timeout | null,
subscription: Subscription | null
} = {
timeout: null,
Expand Down Expand Up @@ -416,7 +414,7 @@ export class Circuit
return new Promise<T>((resolve, reject) =>
{
const handleObj: {
timeout: Timer | null,
timeout: NodeJS.Timeout | null,
subscription: Subscription | null
} = {
timeout: null,
Expand Down
3 changes: 1 addition & 2 deletions lib/classes/ObjectStoreLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { LLSDNotationParser } from './llsd/LLSDNotationParser';
import { LLSDMap } from './llsd/LLSDMap';
import { LLGLTFMaterialOverride, LLGLTFTextureTransformOverride } from './LLGLTFMaterialOverride';
import * as Long from 'long';
import Timer = NodeJS.Timer;

export class ObjectStoreLite implements IObjectStore
{
Expand Down Expand Up @@ -88,7 +87,7 @@ export class ObjectStoreLite implements IObjectStore
}>;
private physicsSubscription: Subscription;
private selectedPrimsWithoutUpdate = new Map<number, boolean>();
private selectedChecker?: Timer;
private selectedChecker?: NodeJS.Timeout;
private blacklist: Map<number, Date> = new Map<number, Date>();
private pendingResolves: Set<number> = new Set<number>();

Expand Down
7 changes: 3 additions & 4 deletions lib/classes/Region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { ParcelOverlayMessage } from './messages/ParcelOverlay';
import { ILandBlock } from './interfaces/ILandBlock';
import { LandFlags } from '../enums/LandFlags';
import { ParcelPropertiesRequestMessage } from './messages/ParcelPropertiesRequest';
import Timer = NodeJS.Timer;
import { UUID } from './UUID';
import { RegionFlags } from '../enums/RegionFlags';
import { BotOptionFlags } from '../enums/BotOptionFlags';
Expand Down Expand Up @@ -1089,7 +1088,7 @@ export class Region
}
else
{
let timeout: Timer | null = null;
let timeout: NodeJS.Timeout | null = null;
const subscription = this.parcelOverlayCompleteEvent.subscribe(() =>
{
if (timeout !== null)
Expand Down Expand Up @@ -1118,7 +1117,7 @@ export class Region
}
else
{
let timeout: Timer | null = null;
let timeout: NodeJS.Timeout | null = null;
const subscription = this.parcelsCompleteEvent.subscribe(() =>
{
if (timeout !== null)
Expand Down Expand Up @@ -1147,7 +1146,7 @@ export class Region
}
else
{
let timeout: Timer | null = null;
let timeout: NodeJS.Timeout | null = null;
const subscription = this.terrainCompleteEvent.subscribe(() =>
{
if (timeout !== null)
Expand Down
3 changes: 1 addition & 2 deletions lib/classes/commands/CommunicationsCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Utils } from '../Utils';
import { UUID } from '../UUID';
import { Vector3 } from '../Vector3';
import { CommandsBase } from './CommandsBase';
import Timer = NodeJS.Timer;

export class CommunicationsCommands extends CommandsBase
{
Expand Down Expand Up @@ -284,7 +283,7 @@ export class CommunicationsCommands extends CommandsBase
{
to = new UUID(to);
}
let typeTimer: Timer | null = null;
let typeTimer: NodeJS.Timeout | null = null;
this.startTypingIM(to).then(() =>
{
typeTimer = setInterval(() =>
Expand Down
6 changes: 2 additions & 4 deletions lib/classes/commands/RegionCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import { Vector3 } from '../Vector3';
import { CommandsBase } from './CommandsBase';
import Timeout = NodeJS.Timeout;

import Timer = NodeJS.Timer;

export interface GetObjectsOptions
{
resolve?: boolean;
Expand Down Expand Up @@ -436,7 +434,7 @@ export class RegionCommands extends CommandsBase
{
return new Promise<GameObject>((resolve, reject) =>
{
let tmr: Timer | null = null;
let tmr: NodeJS.Timeout | null = null;
const subscription = this.currentRegion.clientEvents.onNewObjectEvent.subscribe(async(event: NewObjectEvent) =>
{
if (event.localID === localID)
Expand All @@ -461,7 +459,7 @@ export class RegionCommands extends CommandsBase
{
return new Promise<GameObject>((resolve, reject) =>
{
let tmr: Timer | null = null;
let tmr: NodeJS.Timeout | null = null;
const subscription = this.currentRegion.clientEvents.onNewObjectEvent.subscribe(async(event: NewObjectEvent) =>
{
if (event.objectID.equals(objectID))
Expand Down
4 changes: 1 addition & 3 deletions lib/classes/public/Avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { Vector3 } from '../Vector3';
import { Quaternion } from '../Quaternion';
import { Subject, Subscription } from 'rxjs';
import { UUID } from '../UUID';
import Timer = NodeJS.Timer;

export class Avatar extends AvatarQueryResult
{
private rotation: Quaternion = Quaternion.getIdentity();
Expand Down Expand Up @@ -198,7 +196,7 @@ export class Avatar extends AvatarQueryResult
catch (ignore)
{
let subs: Subscription | undefined = undefined;
let timr: Timer | undefined = undefined;
let timr: NodeJS.Timeout | undefined = undefined;
subs = this.onAttachmentAdded.subscribe((obj: GameObject) =>
{
if (obj.itemID.equals(itemID))
Expand Down
26 changes: 17 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caspertech/node-metaverse",
"version": "0.7.22",
"version": "0.7.24",
"description": "A node.js interface for Second Life.",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
Expand All @@ -25,7 +25,7 @@
"devDependencies": {
"@angular-eslint/eslint-plugin": "^12.7.0",
"@types/micromatch": "^4.0.4",
"@types/node": "^16.18.60",
"@types/node": "^22.4.0",
"@types/tiny-async-pool": "^2.0.2",
"@types/uuid": "^8.3.4",
"@types/xml2js": "^0.4.14",
Expand All @@ -37,7 +37,7 @@
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"typescript": "^4.9.5"
"typescript": "^5.5.4"
},
"dependencies": {
"@caspertech/llsd": "^1.0.5",
Expand Down

0 comments on commit b55af06

Please sign in to comment.