Conversation
5c85813 to
e006407
Compare
b8e6c72 to
0ed5a67
Compare
7e0fe1a to
c78ce5c
Compare
b3cbaa4 to
78c375c
Compare
…be stored in a variable and can go directly in the resulting document
…tf16` after having collected the `textLength.utf16` of all the `children`
…ay and then using a `for...of` loop
fvictorio
approved these changes
Jul 9, 2025
Member
fvictorio
left a comment
There was a problem hiding this comment.
I don't agree with some of the refactors here (e.g., I think destructuring + aliases like const { foo: bar } = qux are generally less readable than const bar = qux.foo), but since this is mostly a personal preference, I'm ok with merging this PR as is.
Member
Author
|
happy to review these destructures in most cases I use the alias in a function signature where I don't have access to the function printComment({ node: comment }) {
if (isComment(comment)) {
return comment.print();
}
throw new Error(`Not a comment: ${JSON.stringify(comment)}`);
}And the other place where I use the alias is in a for (const { variant: attribute } of this.attributes.items) {
if (
typeof attribute !== 'string' &&
attribute.kind === NonterminalKind.ModifierInvocation
) {
attribute.cleanModifierInvocationArguments();
}
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
it has a cleaner type for the type checks, and the standard in
prettier's parsers.using the same approach,
getNode(2)was replaced bygrandparent.I also added some really quick refactors that I found when replacing these cases and don't really merit another PR.