mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
do not report use-before-declaration error in async like IIFE initial… (#55279)
This commit is contained in:
@@ -452,7 +452,6 @@ import {
|
||||
isAssignmentOperator,
|
||||
isAssignmentPattern,
|
||||
isAssignmentTarget,
|
||||
isAsyncFunction,
|
||||
isAutoAccessorPropertyDeclaration,
|
||||
isAwaitExpression,
|
||||
isBinaryExpression,
|
||||
@@ -3874,7 +3873,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function isSameScopeDescendentOf(initial: Node, parent: Node | undefined, stopAt: Node): boolean {
|
||||
return !!parent && !!findAncestor(initial, n =>
|
||||
n === parent
|
||||
|| (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false));
|
||||
|| (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || (getFunctionFlags(n) & FunctionFlags.AsyncGenerator)) ? "quit" : false));
|
||||
}
|
||||
|
||||
function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined {
|
||||
|
||||
Reference in New Issue
Block a user