Skip to content

Commit

Permalink
refactor: add type assertion for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
shenyih0ng committed Apr 1, 2024
1 parent b5a51d7 commit 02c33cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go-slang/ece.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function evaluate(program: SourceFile, slangContext: SlangContext): Value
// inject predeclared functions into the global environment
const B = new Map<number, (...args: any[]) => any>()
PREDECLARED_FUNCTIONS.forEach(({ name, func, op }, id) => {
E.declare(name, { ...op, id })
E.declare(name, { ...op, id } as BuiltinOp)
if (name === 'println') {
// println is special case where we need to the `rawDisplay` slang builtin for
// console capture, therefore we handle it differently from other predeclared functions
Expand Down

0 comments on commit 02c33cf

Please sign in to comment.