diff --git a/modern/src/runtime/Component.ts b/modern/src/runtime/Component.ts index ad69101a..8ba17f30 100644 --- a/modern/src/runtime/Component.ts +++ b/modern/src/runtime/Component.ts @@ -1,5 +1,8 @@ import GuiObject from "./GuiObject"; import { unimplementedWarning } from "../utils"; +import Wac from "./Wac"; +import MakiMap from "./Map"; +import Region from "./Region"; class Component extends GuiObject { /** @@ -12,11 +15,11 @@ class Component extends GuiObject { return "Component"; } - ongetwac(wacobj): void { + ongetwac(wacobj: Wac): void { this.js_trigger("onGetWac", wacobj); } - ongiveupwac(wacobj): void { + ongiveupwac(wacobj: Wac): void { this.js_trigger("onGiveUpWac", wacobj); } @@ -30,12 +33,12 @@ class Component extends GuiObject { return; } - setregionfrommap(regionmap, threshold: number, reverse: boolean) { + setregionfrommap(regionmap: MakiMap, threshold: number, reverse: boolean) { unimplementedWarning("setregionfrommap"); return; } - setregion(reg) { + setregion(reg: Region) { unimplementedWarning("setregion"); return; } diff --git a/modern/src/runtime/Region.ts b/modern/src/runtime/Region.ts index d9fcd42a..eb9e80a7 100644 --- a/modern/src/runtime/Region.ts +++ b/modern/src/runtime/Region.ts @@ -1,5 +1,6 @@ import MakiObject from "./MakiObject"; import { unimplementedWarning } from "../utils"; +import MakiMap from "./Map"; class Region extends MakiObject { /** @@ -12,7 +13,7 @@ class Region extends MakiObject { return "Region"; } - loadfrommap(regionmap, threshold: number, reversed: boolean) { + loadfrommap(regionmap: MakiMap, threshold: number, reversed: boolean) { unimplementedWarning("loadFromMap"); } @@ -20,12 +21,12 @@ class Region extends MakiObject { unimplementedWarning("offset"); } - add(reg) { + add(reg: Region) { unimplementedWarning("add"); return; } - sub(reg) { + sub(reg: Region) { unimplementedWarning("sub"); return; } @@ -35,7 +36,7 @@ class Region extends MakiObject { return; } - copy(reg) { + copy(reg: Region) { unimplementedWarning("copy"); return; } diff --git a/modern/src/runtime/Wac.ts b/modern/src/runtime/Wac.ts index 0675c8cc..bc49ba55 100644 --- a/modern/src/runtime/Wac.ts +++ b/modern/src/runtime/Wac.ts @@ -42,6 +42,9 @@ class Wac extends MakiObject { return; } + // @ts-ignore This (deprecated) method's signature does not quite match the + // same method on MakiObject. This method is not used by any skins as far as + // we know, so we'll just ignore the issue for now. onnotify(notifstr: string, a: number, b: number): void { this.js_trigger("onNotify", notifstr, a, b); } diff --git a/tsconfig.json b/tsconfig.json index ce9f6eef..0f830015 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,12 @@ "modern/src/runtime/Group.ts", "modern/src/runtime/Timer.ts", "modern/src/runtime/Config.ts", - "modern/src/runtime/ConfigItem.ts" + "modern/src/runtime/ConfigItem.ts", + "modern/src/runtime/Component.ts", + "modern/src/runtime/Browser.ts", + "modern/src/runtime/Wac.ts", + "modern/src/runtime/Map.ts", + "modern/src/runtime/Region.ts" ], "exclude": ["node_modules", "**/*.spec.ts", "demo/built"] }