Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Add option to mark current file as entrypoint#13

Draft
Davilarek wants to merge 1 commit intomainfrom
feat-ehanced-support-for-multi-file-input
Draft

Add option to mark current file as entrypoint#13
Davilarek wants to merge 1 commit intomainfrom
feat-ehanced-support-for-multi-file-input

Conversation

@Davilarek
Copy link
Member

Which by default makes the file not to be considered as needed for format conversion which is only useful in entrypoints

which by default makes the file not to be considered as needed for format conversion which is only useful in entrypoints
@Davilarek Davilarek requested a review from JustOptimize July 24, 2024 22:47
}
parsedBodyWithoutOurImports.unshift(...await addCode(targetedDiscordModApiLibrary.default));
if ((targetedDiscordModApiLibrary as { default: IModImplementation } & { convertFormat: (ast_: Statement[]) => Statement[] }).convertFormat == undefined)
if (shouldConvertFormat == false || (targetedDiscordModApiLibrary as { default: IModImplementation } & { convertFormat: (ast_: Statement[]) => Statement[] }).convertFormat == undefined)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, could you use !shouldConvertFormat ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if it is a string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

networking taught me to never trust the user

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldConvertFormat is a boolean. What "string" are you referencing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if somehow user passes a string to that function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!!

@Davilarek Davilarek marked this pull request as draft July 24, 2024 23:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants