diff --git a/src/RedPill.d.ts b/src/RedPill.d.ts deleted file mode 100644 index b9909c1d1..000000000 --- a/src/RedPill.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare let redPillFlag: boolean; -export declare function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number); -export declare function setRedPillFlag(b: boolean): void; diff --git a/src/RedPill.jsx b/src/RedPill.tsx similarity index 90% rename from src/RedPill.jsx rename to src/RedPill.tsx index 768175910..fc479b3f5 100644 --- a/src/RedPill.jsx +++ b/src/RedPill.tsx @@ -8,14 +8,15 @@ import { SourceFileFlags } from "./SourceFile/SourceFileFlags"; import { SourceFiles } from "./SourceFile/SourceFiles"; import { dialogBoxCreate } from "../utils/DialogBox"; +import { IRouter } from "./ui/Router"; export let redPillFlag = false; -export function setRedPillFlag(b) { +export function setRedPillFlag(b: boolean): void { redPillFlag = b; } -function giveSourceFile(bitNodeNumber) { +function giveSourceFile(bitNodeNumber: number): void { var sourceFileKey = "SourceFile" + bitNodeNumber.toString(); var sourceFile = SourceFiles[sourceFileKey]; if (sourceFile == null) { @@ -62,7 +63,7 @@ function giveSourceFile(bitNodeNumber) { } } -export function enterBitNode(router, flume, destroyedBitNode, newBitNode) { +export function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void { if (!flume) { giveSourceFile(destroyedBitNode); } else {