-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Handle shebang, emit helpers, prologues and triple slash refs in prepend nodes #29582
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
Conversation
// Helpers | ||
let helpers: UnscopedEmitHelpers[] | undefined; | ||
while (true) { | ||
const helperInfo = tryGetUnscopedEmitHelper(text, pos); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we even be scanning for helpers or prologues if the source type is a "dts"
? Likewise, should we bother scanning for triple slash directives in "js"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can but we need to make a note that if some such future common header like functionality needs to be added to consider both emits since emitter doesn't distinguish these concepts between dts or js and goes with transformed nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, doesn't that imply that the factory
function should just take the nodes/fields as children and that there should be parser
helpers for fetching them from the text (rather than the factory function automatically producing them itself)?
Closing this in favor of #29630 |
Fixes #25550