Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add @parcel/macros package with macro context TS definitions #9544

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Feb 26, 2024

For use in macros that want to create assets or change caching behavior. The this context can be typed like this:

import {MacroContext} from '@parcel/macros';

export function myMacro(this: MacroContext) {
  // ...
}

In the future we could potentially put more than just types in this package, e.g. if we wanted to have some built-in macros.

@devongovett devongovett merged commit 78fe2ce into v2 Feb 27, 2024
14 of 16 checks passed
@devongovett devongovett deleted the macro-types branch February 27, 2024 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants