@leafer/debug 1.0.0-rc.20 → 1.0.0-rc.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/debug",
3
- "version": "1.0.0-rc.20",
3
+ "version": "1.0.0-rc.21",
4
4
  "description": "@leafer/debug",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,9 +22,9 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.0-rc.20"
25
+ "@leafer/math": "1.0.0-rc.21"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.20"
28
+ "@leafer/interface": "1.0.0-rc.21"
29
29
  }
30
30
  }
package/src/Debug.ts CHANGED
@@ -8,6 +8,7 @@ export class Debug {
8
8
  static excludeList: string[] = []
9
9
 
10
10
  // other
11
+ static showWarn = true
11
12
  static showRepaint: boolean
12
13
  static showHitView: boolean | string | string[]
13
14
  static showBoundsView: boolean | string | string[]
@@ -46,7 +47,7 @@ export class Debug {
46
47
  }
47
48
 
48
49
  warn(...messages: unknown[]): void {
49
- console.warn(this.name, ...messages)
50
+ if (D.showWarn) console.warn(this.name, ...messages)
50
51
  }
51
52
 
52
53
  repeat(name: string, ...messages: unknown[]) {
package/types/index.d.ts CHANGED
@@ -21,6 +21,7 @@ declare class Debug {
21
21
  static enable: boolean;
22
22
  static filterList: string[];
23
23
  static excludeList: string[];
24
+ static showWarn: boolean;
24
25
  static showRepaint: boolean;
25
26
  static showHitView: boolean | string | string[];
26
27
  static showBoundsView: boolean | string | string[];