mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
Improve a few more types in Maki objects
This commit is contained in:
parent
148a1afd2d
commit
66666efbb6
4 changed files with 21 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue