You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (enclosingDeclaration && getAccessibleSymbolChain(container, enclosingDeclaration, SymbolFlags.Namespace, /*externalOnly*/ false)) {
3498
-
return concatenate(concatenate([container], additionalContainers), reexportContainers); // This order expresses a preference for the real container if it is in scope
3499
+
return append(concatenate(concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer); // This order expresses a preference for the real container if it is in scope
3499
3500
}
3500
-
const res = append(additionalContainers, container);
3501
+
const res = append(append(additionalContainers, container), objectLiteralContainer);
3501
3502
return concatenate(res, reexportContainers);
3502
3503
}
3503
3504
const candidates = mapDefined(symbol.declarations, d => {
@@ -3522,6 +3523,18 @@ namespace ts {
3522
3523
}
3523
3524
}
3524
3525
3526
+
function getVariableDeclarationOfObjectLiteral(symbol: Symbol, meaning: SymbolFlags) {
3527
+
// If we're trying to reference some object literal in, eg `var a = { x: 1 }`, the symbol for the literal, `__object`, is distinct
3528
+
// from the symbol of the declaration it is being assigned to. Since we can use the declaration to refer to the literal, however,
3529
+
// we'd like to make that connection here - potentially causing us to paint the declaration's visibility, and therefore the literal.
0 commit comments