JS: Update OK-style comments to $-style

This commit is contained in:
Asger F
2025-02-06 13:34:01 +01:00
parent 7e5c24a8ec
commit 9be041e27d
536 changed files with 4408 additions and 4762 deletions

View File

@@ -1,4 +1,4 @@
// OK: people sometimes use multiple declarations in an externs file to represent multiple type signatures
// OK - people sometimes use multiple declarations in an externs file to represent multiple type signatures
var f = function() {};
var f = function(x) {};

View File

@@ -1,5 +1,5 @@
function f() {
// OK
var f;
}

View File

@@ -8,12 +8,12 @@ namespace N2 {
let y;
}
namespace N2 { // OK
namespace N2 {
var w;
}
function f(x: number): number;
function f(x: string): string; // OK
function f(x: any): any { // OK
function f(x: string): string;
function f(x: any): any {
return x;
}

View File

@@ -6,7 +6,7 @@ function f() {
f();
function f() { // NOT OK
function f() { // $ Alert
console.log("first declaration");
}

View File

@@ -1,22 +1,22 @@
function f() {
var x = 1;
var x = 2; // NOT OK
var x = 2; // $ Alert
}
function g(x) {
var x = 1; // NOT OK
var x = 1; // $ Alert
}
function h() {
var i = 1;
for (var i = 0; i < 10; i++) { // NOT OK
for (var i = 0; i < 10; i++) { // $ Alert
}
}
function k() {
var y = 1;
var x = 2,
y = 2; // NOT OK
y = 2; // $ Alert
}
var g;