_getTSConfigPath = (cwd, cliProjectOption) => {
  /** @type {string | undefined} */
  let tsConfigPath = _getTSConfigFromDefaultLocations(cwd)

  if (cliProjectOption !== undefined) {
    tsConfigPath = _resolveTSConfigPath(cwd, cliProjectOption)
  } else {
    const settings = packageConfigSync('ts-standard', { cwd })
    if (settings.project != null) {
      tsConfigPath = _resolveTSConfigPath(cwd, settings.project)
    }
  }

  if (tsConfigPath === undefined) {
    console.error(
      'Unable to locate the project file. A project file (tsconfig.json or ' +
        'tsconfig.eslint.json) is required in order to use ts-standard.'
    )
    return process.exit(1)
  }

  return tsConfigPath
}
@param {string} cwd
@param {string | undefined} cliProjectOption
@returns {string}