How to use type-coverage-core - 1 common examples

To help you get started, we’ve selected a few type-coverage-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plantain-00 / type-coverage / packages / cli / src / index.ts View on Github external
async function executeCommandLine() {
  const argv = minimist(process.argv.slice(2), { '--': true }) as unknown as ParsedArgs

  const showVersion = argv.v || argv.version
  if (showVersion) {
    showToolVersion()
    return
  }

  suppressError = argv.suppressError

  const { correctCount, totalCount, anys } = await lint(
    argv.p || argv.project || '.',
    {
      debug: argv.debug,
      strict: argv.strict,
      enableCache: argv.cache,
      ignoreCatch: argv['ignore-catch'],
      ignoreFiles: argv['ignore-files']
    }
  )
  const percent = Math.floor(10000 * correctCount / totalCount) / 100
  const atLeast = await getAtLeast(argv)
  const failed = atLeast && percent < atLeast
  if (argv.detail || failed) {
    for (const { file, line, character, text } of anys) {
      console.log(`${path.resolve(process.cwd(), file)}:${line + 1}:${character + 1}: ${text}`)
    }

type-coverage-core

A library to check type coverage for typescript code

MIT
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis

Popular type-coverage-core functions

Similar packages