code: function getTypeReferenceDirectivesForEntityName(node) {
                  // program does not have any files with type reference directives - bail out
                  if (!fileToDirective) {
                      return undefined;
                  }
                  // property access can only be used as values
                  // qualified names can only be used as types\namespaces
                  // identifiers are treated as values only if they appear in type queries
                  var meaning = (node.kind === 172 /* PropertyAccessExpression */) || (node.kind === 69 /* Identifier */ && isInTypeQuery(node))
                      ? 107455 /* Value */ | 1048576 /* ExportValue */
                      : 793064 /* Type */ | 1920 /* Namespace */;
                  var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true);
                  return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : undefined;
              }
docs: defined here to avoid outer scope pollution