Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Handle comment directives in incremental parsing#37632

Merged
sheetalkamat merged 2 commits into
mastermicrosoft/TypeScript:masterfrom
commentDirectivemicrosoft/TypeScript:commentDirectiveCopy head branch name to clipboard
Mar 27, 2020
Merged

Handle comment directives in incremental parsing#37632
sheetalkamat merged 2 commits into
mastermicrosoft/TypeScript:masterfrom
commentDirectivemicrosoft/TypeScript:commentDirectiveCopy head branch name to clipboard

Conversation

@sheetalkamat

Copy link
Copy Markdown
Member

Fixes #37536

@andrewbranch andrewbranch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense 👍

Comment thread src/compiler/parser.ts
Comment on lines +7860 to +7865
if (!commentDirectives) {
commentDirectives = newDirectives;
}
else if (newDirectives) {
commentDirectives.push(...newDirectives);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think concatenate in core can handle this in a single call, similarly to append

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That one creates new array if both arrays are !undefined which is what this avoids since anyways we already have new array

@sheetalkamat sheetalkamat merged commit 7f59949 into master Mar 27, 2020
@sheetalkamat sheetalkamat deleted the commentDirective branch March 27, 2020 19:00
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@ts-ignore stops in editing (regression)

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.