mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 16:38:46 -05:00
PR feedback
This commit is contained in:
@@ -17738,7 +17738,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (node.kind === SyntaxKind.BindingElement) {
|
||||
if (node.parent.kind === SyntaxKind.ObjectBindingPattern && languageVersion < ScriptTarget.ESNext && !isInAmbientContext(node)) {
|
||||
if (node.parent.kind === SyntaxKind.ObjectBindingPattern && languageVersion < ScriptTarget.ESNext) {
|
||||
checkExternalEmitHelpers(node, ExternalEmitHelpers.Rest);
|
||||
}
|
||||
// check computed properties inside property names of binding elements
|
||||
@@ -18758,7 +18758,7 @@ namespace ts {
|
||||
|
||||
const baseTypeNode = getClassExtendsHeritageClauseElement(node);
|
||||
if (baseTypeNode) {
|
||||
if (languageVersion < ScriptTarget.ES2015 && !isInAmbientContext(node)) {
|
||||
if (languageVersion < ScriptTarget.ES2015) {
|
||||
checkExternalEmitHelpers(baseTypeNode.parent, ExternalEmitHelpers.Extends);
|
||||
}
|
||||
|
||||
@@ -21287,7 +21287,7 @@ namespace ts {
|
||||
function checkExternalEmitHelpers(location: Node, helpers: ExternalEmitHelpers) {
|
||||
if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
|
||||
const sourceFile = getSourceFileOfNode(location);
|
||||
if (!isDeclarationFile(sourceFile) && isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
||||
if (isEffectiveExternalModule(sourceFile, compilerOptions) && !isInAmbientContext(location)) {
|
||||
const helpersModule = resolveHelpersModule(sourceFile, location);
|
||||
if (helpersModule !== unknownSymbol) {
|
||||
const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace ts {
|
||||
|
||||
function forEachLeadingCommentToEmit(pos: number, cb: (commentPos: number, commentEnd: number, kind: SyntaxKind, hasTrailingNewLine: boolean, rangePos: number) => void) {
|
||||
// Emit the leading comments only if the container's pos doesn't match because the container should take care of emitting these comments
|
||||
if ((containerPos === -1 || pos !== containerPos)) {
|
||||
if (containerPos === -1 || pos !== containerPos) {
|
||||
if (hasDetachedComments(pos)) {
|
||||
forEachLeadingCommentWithoutDetachedComments(cb);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ namespace ts {
|
||||
|
||||
function forEachTrailingCommentToEmit(end: number, cb: (commentPos: number, commentEnd: number, kind: SyntaxKind, hasTrailingNewLine: boolean) => void) {
|
||||
// Emit the trailing comments only if the container's end doesn't match because the container should take care of emitting these comments
|
||||
if ((containerEnd === -1 || (end !== containerEnd && end !== declarationListContainerEnd))) {
|
||||
if (containerEnd === -1 || (end !== containerEnd && end !== declarationListContainerEnd)) {
|
||||
forEachTrailingCommentRange(currentText, end, cb);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user