mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
do not report use-before-declaration error in async IIFE initializer (#50199)
This commit is contained in:
@@ -2648,7 +2648,7 @@ namespace ts {
|
||||
*/
|
||||
function isSameScopeDescendentOf(initial: Node, parent: Node | undefined, stopAt: Node): boolean {
|
||||
return !!parent && !!findAncestor(initial, n => n === parent
|
||||
|| (n === stopAt || isFunctionLike(n) && !getImmediatelyInvokedFunctionExpression(n) ? "quit" : false));
|
||||
|| (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false));
|
||||
}
|
||||
|
||||
function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined {
|
||||
|
||||
Reference in New Issue
Block a user