Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Davilarek committed Jun 30, 2024
1 parent c53d194 commit 908865a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function deepFind<K>(obj: any, path: string): K | undefined {

export default async function (ast: ParseResult<File>, targetedDiscordModApiLibrary: { default: IModImplementation }): Promise<Statement[]> {
const parsedBody = ast.program.body;
const importStatements = parsedBody.filter(x => x.type == "ImportDeclaration") as Statement[];
const importStatements = parsedBody.filter(x => x.type == "ImportDeclaration") as Standardized[];
const importAliasMap = [] as { internalName: string, codeName: string }[];
removeASTLocation(importStatements);
const importsToRemove: number[] = [];
Expand All @@ -119,7 +119,7 @@ export default async function (ast: ParseResult<File>, targetedDiscordModApiLibr
}
const trueImportsToRemove =
importStatements.filter((_, index) => importsToRemove.includes(index));
const parsedBodyWithoutOurImports = parsedBody.filter((item, index) => !trueImportsToRemove.includes(parsedBody[index]));
const parsedBodyWithoutOurImports = parsedBody.filter((item, index) => !trueImportsToRemove.includes(parsedBody[index] as Standardized));
// parsedBodyWithoutOurImports.unshift(...await addCode(targetedDiscordModApiLibrary.default));
for (let index = 0; index < parsedBodyWithoutOurImports.length; index++) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down

0 comments on commit 908865a

Please sign in to comment.