Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: adjust /* #__PURE__*/ comment timing #1623

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

newives
Copy link
Contributor

@newives newives commented Nov 1, 2023

No description provided.

export const setAdditionalMeta = /* #__PURE__*/ (
meta: MetaInfo | null
): void => {
export const setAdditionalMeta = (meta: MetaInfo | null): void => {
Copy link
Member

Choose a reason for hiding this comment

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

I think we swap to /* #__NO_SIDE_EFFECTS__ */, not remove /* #__PURE__ */
see the #1599 (comment)
ref: https://github.com/javascript-compiler-hints/compiler-notations-spec/blob/main/no-side-effects-notation-spec.md

@@ -52,7 +52,7 @@ function baseCompile(
return { ...baseCompileCore(message, options), detectError }
}

export const compileToFunction = /* #__PURE__*/ <
export const compileToFunction = <
Copy link
Member

Choose a reason for hiding this comment

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

_additionalMeta = meta
}

export const getAdditionalMeta = /* #__PURE__*/ (): MetaInfo | null =>
_additionalMeta
export const getAdditionalMeta = (): MetaInfo | null => _additionalMeta
Copy link
Member

Choose a reason for hiding this comment

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

@newives
Copy link
Contributor Author

newives commented Nov 1, 2023

done

@newives newives requested a review from kazupon November 1, 2023 11:31
Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Well done!
Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants