code: function tryExtractTypeScriptExtension(fileName) {
          return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
      }
docs: Return ".ts", ".d.ts", or ".tsx", if that is the extension.