code: function getTypeDefinitionAtPosition(fileName, position) {
              synchronizeHostData();
              var sourceFile = getValidSourceFile(fileName);
              var node = ts.getTouchingPropertyName(sourceFile, position);
              if (node === sourceFile) {
                  return undefined;
              }
              var typeChecker = program.getTypeChecker();
              var symbol = typeChecker.getSymbolAtLocation(node);
              if (!symbol) {
                  return undefined;
              }
              var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node);
              if (!type) {
                  return undefined;
              }
              if (type.flags & 524288 /* Union */ && !(type.flags & 16 /* Enum */)) {
                  var result_4 = [];
                  ts.forEach(type.types, function (t) {
                      if (t.symbol) {
                          ts.addRange(/*to*/ result_4, /*from*/ getDefinitionFromSymbol(t.symbol, node));
                      }
                  });
                  return result_4;
              }
              if (!type.symbol) {
                  return undefined;
              }
              return getDefinitionFromSymbol(type.symbol, node);
          }
docs: / Goto type