labag 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { P } from "@/types/P";
2
- import { ModeNames } from "@/types/Mode";
1
+ import { P } from "../types/P";
2
+ import { ModeNames } from "../types/Mode";
3
3
  export interface LaBaG {
4
4
  AllData: Record<string, Record<string, number>>;
5
5
  OneData: Record<string, number>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseLaBaG = void 0;
4
- const P_1 = require("@/types/P");
4
+ const P_1 = require("../types/P");
5
5
  const RandInt_1 = require("../utils/RandInt");
6
6
  const __1 = require("..");
7
7
  class BaseLaBaG {
@@ -21,8 +21,8 @@ class BaseLaBaG {
21
21
  ].reduce((Ranges, mode) => {
22
22
  const res = [];
23
23
  let accRate = 0;
24
- for (const p of Object.values(P_1.P.Map)) {
25
- accRate += p.Rates[mode];
24
+ for (const p of P_1.P.Map.values()) {
25
+ accRate += p.rates[mode];
26
26
  res.push(accRate);
27
27
  }
28
28
  Ranges[mode] = res;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labag",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
- import { P } from "@/types/P";
2
- import { Mode, ModeNames } from "@/types/Mode";
1
+ import { P } from "../types/P";
2
+ import { Mode, ModeNames } from "../types/Mode";
3
3
  import { RandInt } from "../utils/RandInt";
4
4
  import { Modes } from "..";
5
5
 
@@ -53,8 +53,8 @@ export class BaseLaBaG implements LaBaG {
53
53
  ].reduce((Ranges: Record<ModeNames, number[]>, mode: string) => {
54
54
  const res: number[] = [];
55
55
  let accRate: number = 0;
56
- for (const p of Object.values(P.Map)) {
57
- accRate += p.Rates[mode as ModeNames];
56
+ for (const p of P.Map.values()) {
57
+ accRate += p.rates[mode as ModeNames];
58
58
  res.push(accRate);
59
59
  }
60
60
  Ranges[mode as ModeNames] = res;
package/tsconfig.json CHANGED
@@ -30,9 +30,7 @@
30
30
  // "rootDir": "./", /* Specify the root folder within your source files. */
31
31
  "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
32
32
  "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
- "paths": {
34
- "@/*": ["src/*"] // 使用 @ 代表 src 目錄
35
- }, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
36
34
  // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
37
35
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
38
36
  // "types": [], /* Specify type package names to be included without being referenced in a source file. */