Skip to content

Commit 725b255

Browse files
committed
Fix typings
1 parent 1c7682e commit 725b255

File tree

1 file changed

+4
-1
lines changed
  • packages/app/src/sandbox/eval/transpilers/babel/convert-esmodule

1 file changed

+4
-1
lines changed

packages/app/src/sandbox/eval/transpilers/babel/convert-esmodule/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ export function convertEsModule(code: string) {
173173
);
174174
i++;
175175

176-
program.body[i] = statement.declaration;
176+
program.body[
177+
i
178+
] = statement.declaration as meriyah.ESTree.DeclarationStatement;
177179
i++;
178180
} else {
179181
program.body[i] = {
@@ -204,6 +206,7 @@ export function convertEsModule(code: string) {
204206
newDeclaration.type === n.ClassDeclaration ||
205207
newDeclaration.type === n.FunctionExpression
206208
) {
209+
// @ts-ignore Different libraries with the same types
207210
program = walk(program, {
208211
enter(node, parent, prop, index) {
209212
if (node.type === n.AssignmentExpression) {

0 commit comments

Comments
 (0)