prefer strict equality, without implicit type conversion;
authorwenzelm
Fri, 18 Feb 2022 14:03:45 +0100
changeset 75096 37bd912c8765
parent 75095 faa24820fba1
child 75097 7001ae6c0832
prefer strict equality, without implicit type conversion;
src/Tools/VSCode/extension/src/state_panel.ts
src/Tools/VSCode/extension/src/symbol.ts
--- a/src/Tools/VSCode/extension/src/state_panel.ts	Fri Feb 18 13:48:50 2022 +0100
+++ b/src/Tools/VSCode/extension/src/state_panel.ts	Fri Feb 18 14:03:45 2022 +0100
@@ -19,7 +19,7 @@
   private webview_panel: WebviewPanel
 
   public get_id(): number { return this.state_id }
-  public check_id(id: number): boolean { return this.state_id == id }
+  public check_id(id: number): boolean { return this.state_id === id }
 
   public set_content(id: number, body: string)
   {
--- a/src/Tools/VSCode/extension/src/symbol.ts	Fri Feb 18 13:48:50 2022 +0100
+++ b/src/Tools/VSCode/extension/src/symbol.ts	Fri Feb 18 14:03:45 2022 +0100
@@ -9,7 +9,7 @@
 export type Symbol = string
 
 export function is_char(s: Symbol): boolean
-{ return s.length == 1 }
+{ return s.length === 1 }
 
 export function is_ascii_letter(s: Symbol): boolean
 { return is_char(s) && "A" <= s && s <= "Z" || "a" <= s && s <= "z" }
@@ -18,7 +18,7 @@
 { return is_char(s) && "0" <= s && s <= "9" }
 
 export function is_ascii_quasi(s: Symbol): boolean
-{ return s == "_" || s == "'" }
+{ return s === "_" || s === "'" }
 
 export function is_ascii_letdig(s: Symbol): boolean
 { return is_ascii_letter(s) || is_ascii_digit(s) || is_ascii_quasi(s) }