From 610bcd6315a876babf14c9c1036514621b416545 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 18 Jul 2022 03:00:51 -0400 Subject: [PATCH] fix any in NetscriptPort --- src/NetscriptPort.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NetscriptPort.ts b/src/NetscriptPort.ts index f44526de3..dbd707d66 100644 --- a/src/NetscriptPort.ts +++ b/src/NetscriptPort.ts @@ -11,10 +11,10 @@ export interface IPort { } export function NetscriptPort(): IPort { - const data: any[] = []; + const data: unknown[] = []; return { - write: (value: any): any => { + write: (value: unknown): unknown => { data.push(value); if (data.length > Settings.MaxPortCapacity) { return data.shift(); @@ -22,7 +22,7 @@ export function NetscriptPort(): IPort { return null; }, - tryWrite: (value: any): boolean => { + tryWrite: (value: unknown): boolean => { if (data.length >= Settings.MaxPortCapacity) { return false; } @@ -30,14 +30,14 @@ export function NetscriptPort(): IPort { return true; }, - read: (): any => { + read: (): unknown => { if (data.length === 0) { return "NULL PORT DATA"; } return data.shift(); }, - peek: (): any => { + peek: (): unknown => { if (data.length === 0) { return "NULL PORT DATA"; } else {