GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(code-gen): fix types error · kidok/lowcode-engine@622806f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • modules/code-generator/src/utils
    • expressionParser.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎modules/code-generator/src/utils/expressionParser.ts‎

Copy file name to clipboardExpand all lines: modules/code-generator/src/utils/expressionParser.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export function parseExpressionGetKeywords(expr: string | null | undefined): str
167167
],
168168
});
169169

170-
const addIdentifierIfNeeded = (x: Record<string, unknown> | number | null | undefined) => {
170+
const addIdentifierIfNeeded = (x: Node | null | undefined) => {
171171
if (typeof x === 'object' && isIdentifier(x) && JS_KEYWORDS.includes(x.name)) {
172172
keywordVars.add(x.name);
173173
}
@@ -189,7 +189,7 @@ export function parseExpressionGetKeywords(expr: string | null | undefined): str
189189
addIdentifierIfNeeded(item);
190190
});
191191
} else {
192-
addIdentifierIfNeeded(fieldValue as Record<string, unknown> | null);
192+
addIdentifierIfNeeded(fieldValue as any);
193193
}
194194
}
195195
});
@@ -217,7 +217,7 @@ export function parseExpressionGetGlobalVariables(
217217
const ast = parser.parse(`!(${expr});`);
218218

219219
const addUndeclaredIdentifierIfNeeded = (
220-
x: Record<string, unknown> | number | null | undefined,
220+
x: Node | null | undefined,
221221
path: NodePath<Node>,
222222
) => {
223223
if (typeof x === 'object' && isIdentifier(x) && !path.scope.hasBinding(x.name)) {
@@ -241,7 +241,7 @@ export function parseExpressionGetGlobalVariables(
241241
addUndeclaredIdentifierIfNeeded(item, path);
242242
});
243243
} else {
244-
addUndeclaredIdentifierIfNeeded(fieldValue as Record<string, unknown> | null, path);
244+
addUndeclaredIdentifierIfNeeded(fieldValue as any, path);
245245
}
246246
}
247247
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.