mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 19:27:35 -06:00
use a normal for loop instead of a forEach
This commit is contained in:
parent
a6bb527278
commit
76e01396c1
@ -4263,9 +4263,12 @@ module ts {
|
||||
if (!node.modifiers) {
|
||||
return checkTopLevelDeclareModifierInAmbientContext(node);
|
||||
}
|
||||
|
||||
var lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node;
|
||||
var flags = 0;
|
||||
var hasErrors = forEach(node.modifiers, m => {
|
||||
for (var i = 0, n = node.modifiers.length; i < n; i++) {
|
||||
var m = node.modifiers[i];
|
||||
|
||||
switch (m.kind) {
|
||||
case SyntaxKind.PublicKeyword:
|
||||
case SyntaxKind.ProtectedKeyword:
|
||||
@ -4342,10 +4345,6 @@ module ts {
|
||||
lastDeclare = m;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
if (hasErrors) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (node.kind === SyntaxKind.Constructor) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user