mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
fix(36989): 'async' modifier cannot be used in an ambient context.ts (#37010)
* fix(36989): omit 'async' modifier for methods in declaration files. * remove useless condition
This commit is contained in:
@@ -6206,7 +6206,7 @@ namespace ts {
|
||||
&& isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)!))) {
|
||||
return [];
|
||||
}
|
||||
const flag = modifierFlags | (isStatic ? ModifierFlags.Static : 0);
|
||||
const flag = (modifierFlags & ~ModifierFlags.Async) | (isStatic ? ModifierFlags.Static : 0);
|
||||
const name = getPropertyNameNodeForSymbol(p, context);
|
||||
const firstPropertyLikeDecl = find(p.declarations, or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
|
||||
if (p.flags & SymbolFlags.Accessor && useAccessors) {
|
||||
|
||||
Reference in New Issue
Block a user