mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
install and configure eslint, bow before eslint
This commit is contained in:
@@ -6,10 +6,10 @@ export default class Aetheryte {
|
||||
}
|
||||
|
||||
constructor(
|
||||
data: any,
|
||||
data: {position: {x: number, y: number, zone: string}, name: {en: string}}
|
||||
) {
|
||||
this.position = data.position;
|
||||
this.name = data.name.en;
|
||||
this.name = data.name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+10
-5
@@ -3,13 +3,18 @@ export default class Item {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly level: number;
|
||||
readonly scripType: ScripType;
|
||||
readonly scripType: ScripType | null;
|
||||
|
||||
constructor(id: string, data: any) {
|
||||
constructor(id: string, data: {[key: string]: number | string | undefined}) {
|
||||
this.id = id;
|
||||
this.name = data?.name;
|
||||
this.level = data?.level;
|
||||
this.scripType = data?.scripType ? ScripType[data.scripType.toUpperCase()] : null;
|
||||
this.name = data?.name as string;
|
||||
this.level = data?.level as number;
|
||||
const scripType: string | undefined = data?.scripType as string;
|
||||
if (scripType != undefined) {
|
||||
this.scripType = typeof data?.scripType === "string" ? scripType.toUpperCase() as ScripType : null;
|
||||
} else {
|
||||
this.scripType = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Job} from "../enums/Job";
|
||||
import {NodeType} from "../enums/NodeType";
|
||||
import {Job} from "@/enums/Job";
|
||||
import {NodeType} from "@/enums/NodeType";
|
||||
import Item from "./Item";
|
||||
import Aetheryte from "./Aetheryte";
|
||||
import TimeRange from "./TimeRange";
|
||||
|
||||
@@ -4,8 +4,10 @@ export default class Zone {
|
||||
en: string,
|
||||
}
|
||||
|
||||
constructor(data: any) {
|
||||
this.name = data.name;
|
||||
constructor(data: {name: {en: string}}) {
|
||||
this.name = {
|
||||
en: data.name.en
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user