{"id":13633825,"url":"https://github.com/codechecks/typecov","last_synced_at":"2025-04-09T21:15:41.086Z","repository":{"id":51113021,"uuid":"176340192","full_name":"codechecks/typecov","owner":"codechecks","description":"Track missing type coverage to ensure type safety","archived":false,"fork":false,"pushed_at":"2021-11-28T07:16:03.000Z","size":587,"stargazers_count":145,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T21:15:35.615Z","etag":null,"topics":["codechecks","type-coverage","type-safety","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codechecks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-18T17:50:13.000Z","updated_at":"2024-09-11T08:20:26.000Z","dependencies_parsed_at":"2022-09-03T19:30:52.726Z","dependency_job_id":null,"html_url":"https://github.com/codechecks/typecov","commit_stats":null,"previous_names":["codechecks/type-coverage-watcher"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codechecks%2Ftypecov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codechecks%2Ftypecov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codechecks%2Ftypecov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codechecks%2Ftypecov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codechecks","download_url":"https://codeload.github.com/codechecks/typecov/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codechecks","type-coverage","type-safety","typescript"],"created_at":"2024-08-01T23:00:52.279Z","updated_at":"2025-04-09T21:15:41.050Z","avatar_url":"https://github.com/codechecks.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":["Visual regression"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./meta/check.png\" width=\"700\" alt=\"codechecks.io\"\u003e\n  \u003ch3 align=\"center\"\u003eTypeCov\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eTrack missing type coverage in TypeScript projects to ensure type safety\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://circleci.com/gh/codechecks/typecov\"\u003e\u003cimg alt=\"Build Status\" src=\"https://circleci.com/gh/codechecks/typecov/tree/master.svg?style=svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"/package.json\"\u003e\u003cimg alt=\"Software License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codechecks.io\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true\" alt=\"codechecks.io\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Features\n\n👉 track type coverage defined as `the count of symbols whose type is not any / the total count of symbols`\u003cbr\u003e\n👉 display type coverage directly in GitHub\u003cbr\u003e\n👉 set minimal type coverage and automatically fail PRs\u003cbr\u003e\n👉 supports monorepos\u003cbr\u003e\n\n## Motivation\n\nDespite using `--strict` mode in tsconfig you can still have `any`s in your codebase. This tool gives you a good overview if PR that you are going to merge increases or decreases overall type coverage and where exactly types should be improved.\n\n## Install\n\n```sh\nnpm install --save-dev typecov\n```\n\n## Usage\n\nTypeCov is built on [CodeChecks.io](https://codechecks.io) - open source code review automation platform.\n\nAre you new to codechecks? Check out [getting started guide (it's simple)](https://github.com/codechecks/docs/blob/master/getting-started.md)!\n\nInstall package and then add to your `codechecks.yml` file:\n\n```yml\nchecks:\n  - name: typecov\n    options:\n      # atLeast: 99\n      # name: webapp\n      # tsconfigPath: ./tsconfig.prod.json\n```\n\nUnder the hood it uses [type-coverage](https://github.com/plantain-00/type-coverage) package.\n\n## API\n\n### typecov(options: Options): Promise\\\u003cvoid\u003e\n\n#### options\n\n```typescript\ninterface Options {\n  name?: string; // will be added to check name\n  tsconfigPath?: string; //defaults to tsconfig.json\n  atLeast?: number;\n  ignoreFiles?: string[];\n  ignoreCatch?: boolean;\n  strict?: boolean;\n}\n```\n\n##### name\n\noptional `string`\u003cbr\u003e\nDefaults: `Type Coverage`\u003cbr\u003e\nSpecify the name for check. Might be useful in monorepos.\n\n##### tsconfigPath\n\noptional `string`\u003cbr\u003e\nDefault: `tsconfig.json`\u003cbr\u003e\nPath to typescript project configuration\n\n##### atLeast\n\noptional `number`\u003cbr\u003e\nDefaults: `undefined`\u003cbr\u003e\nExample: `atLeast: 99`\u003cbr\u003e\nFail if coverage rate \u003c this value.\n\n##### ignoreFiles\n\noptional `string[]`\u003cbr\u003e\nDefaults: `undefined`\u003cbr\u003e\nSpecify the ignored for checks files.\nSee [type-coverage's description](https://github.com/plantain-00/type-coverage#ignore-files) for the reference.\n\n##### ignoreCatch\n\noptional `string`\u003cbr\u003e\nDefaults: `undefined`\u003cbr\u003e\nSee [type-coverage's description](https://github.com/plantain-00/type-coverage#ignore-catch) for the reference.\n\n##### strict\n\noptional `string`\u003cbr\u003e\nDefaults: `undefined`\u003cbr\u003e\nSee [type-coverage's description](https://github.com/plantain-00/type-coverage#strict-mode) for the reference.\n\n## Contributing\n\nAll contributions are welcomed. Read more in [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## Licence\n\nMIT @ [codechecks.io](https://codechecks.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechecks%2Ftypecov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodechecks%2Ftypecov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodechecks%2Ftypecov/lists"}