code: function getTypeReferenceDirectivesForSymbol(symbol, meaning) {
                  // program does not have any files with type reference directives - bail out
                  if (!fileToDirective) {
                      return undefined;
                  }
                  if (!isSymbolFromTypeDeclarationFile(symbol)) {
                      return undefined;
                  }
                  // check what declarations in the symbol can contribute to the target meaning
                  var typeReferenceDirectives;
                  for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                      var decl = _a[_i];
                      // check meaning of the local symbol to see if declaration needs to be analyzed further
                      if (decl.symbol && decl.symbol.flags & meaning) {
                          var file = ts.getSourceFileOfNode(decl);
                          var typeReferenceDirective = fileToDirective.get(file.path);
                          if (typeReferenceDirective) {
                              (typeReferenceDirectives || (typeReferenceDirectives = [])).push(typeReferenceDirective);
                          }
                      }
                  }
                  return typeReferenceDirectives;
              }
docs: defined here to avoid outer scope pollution