Skip to content

Commit 6686b43

Browse files
committed
using an actual for...in loop instead of storing the keys in an array and then using a for...of loop
1 parent 3d1a7c4 commit 6686b43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/slangPrinter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ function ignoreComments(path: AstPath<AstNode>): void {
2121
// We ignore anything that is not an object
2222
if (node === null || typeof node !== 'object') return;
2323

24-
const keys = Object.keys(node) as (keyof StrictAstNode)[];
25-
for (const key of keys) {
24+
let key: keyof StrictAstNode;
25+
for (key in node) {
2626
switch (key) {
2727
// We ignore `kind`, `loc`, and comments since these are added by the
2828
// parser

0 commit comments

Comments
 (0)