Skip to content

Tighten heuristic for definite dts moduleness to check for syntactic default#22814

Merged
weswigham merged 2 commits into
microsoft:masterfrom
weswigham:require-syntatic-export-default
Mar 26, 2018
Merged

Tighten heuristic for definite dts moduleness to check for syntactic default#22814
weswigham merged 2 commits into
microsoft:masterfrom
weswigham:require-syntatic-export-default

Conversation

@weswigham
Copy link
Copy Markdown
Member

Fixes #22812

@weswigham weswigham force-pushed the require-syntatic-export-default branch from 26f5506 to 607a98d Compare March 22, 2018 23:04
Comment thread src/compiler/checker.ts Outdated
if (hasModifier(node, ModifierFlags.Default)) {
return true;
}
return false;
Copy link
Copy Markdown

@alfaproject alfaproject Mar 24, 2018

Choose a reason for hiding this comment

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

Either one line, or two lines, but I think this is just as readable if you prefer

return isExportAssignment(node) && !node.isExportEquals
  || hasModifier(node, ModifierFlags.Default);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 for @alfaproject suggestion.

@weswigham weswigham merged commit dcbc478 into microsoft:master Mar 26, 2018
@weswigham weswigham deleted the require-syntatic-export-default branch March 29, 2018 19:19
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants