{"id":18974651,"url":"https://github.com/asd-xiv/tsd-lite-cli","last_synced_at":"2025-04-16T09:34:06.331Z","repository":{"id":65756795,"uuid":"597372925","full_name":"asd-xiv/tsd-lite-cli","owner":"asd-xiv","description":":runner: :link: :bug: Test runner for TypeScript typings. CLI over `tsd-lite`, a per-file version of `tsd`.","archived":true,"fork":false,"pushed_at":"2024-12-28T15:05:00.000Z","size":1783,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T21:09:06.409Z","etag":null,"topics":["cli","tap","test","test-runner","tsd","tsd-lite","types","typescript","typings"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/asd-xiv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T10:50:50.000Z","updated_at":"2024-12-28T15:05:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b38080e-039c-405f-ade2-809b60941867","html_url":"https://github.com/asd-xiv/tsd-lite-cli","commit_stats":{"total_commits":71,"total_committers":2,"mean_commits":35.5,"dds":"0.11267605633802813","last_synced_commit":"2afac505f9a25d7fe094e69e66ec177d14386896"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Ftsd-lite-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Ftsd-lite-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Ftsd-lite-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asd-xiv%2Ftsd-lite-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asd-xiv","download_url":"https://codeload.github.com/asd-xiv/tsd-lite-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249223937,"owners_count":21232833,"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":["cli","tap","test","test-runner","tsd","tsd-lite","types","typescript","typings"],"created_at":"2024-11-08T15:15:41.435Z","updated_at":"2025-04-16T09:34:06.314Z","avatar_url":"https://github.com/asd-xiv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable first-line-h1 --\u003e\n\n\u003e [!CAUTION]\n\u003e\n\u003e `tsd-lite-cli` is deprecated due to `tsd-lite` being [deprecated](https://github.com/mrazauskas/tsd-lite/issues/364).  \n\u003e Migrate to [TSTyche](https://github.com/tstyche/tstyche), it has all the bells and whistles.\n\nHere is a TL;DR of how to use it:\n\n```sh\nnpm install --save-dev tstyche\n```\n\n```ts\n// src/pipe-p.tst.ts\nimport { describe, expect, test } from \"tstyche\"\nimport { pipeP } from \"./pipe-p.js\"\n\nconst inc = (x: number) =\u003e x + 1\nconst asyncToString = async (x: unknown) =\u003e String(x)\n\ndescribe(\"pipeP :: left-right composition with promise support\", () =\u003e {\n  test(\"given [inc, asyncToString of 1] should [return '2']\", async () =\u003e {\n    const result = await pipeP(inc, asyncToString)(1)\n\n    expect\u003ctypeof result\u003e().type.toBe\u003cstring\u003e()\n  })\n})\n```\n\n```sh\nnpx tstyche 'src/**/*.tst.ts'\n```\n\n---\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/asd-xiv/tsd-lite-cli/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/asd-xiv/tsd-lite-cli/tree/main)\n![npm](https://img.shields.io/npm/v/tsd-lite-cli)\n[![Coverage Status](https://coveralls.io/repos/github/asd-xiv/tsd-lite-cli/badge.svg?branch=main)](https://coveralls.io/github/asd-xiv/tsd-lite-cli?branch=main)\n\n# tsd-lite-cli\n\n:bug: :link: :runner: Test runner for TypeScript typings. CLI over\n[`tsd-lite`][intro_tsd-lite], a per-file version of [`tsd`][intro_tsd].\n\n- :mag: [Glob][intro_fast-glob] pattern matching\n- :white_check_mark: [TAP][intro_tap] compatible output\n\n![tsd-lite-cli default colored tap output](docs/output-default.png\n\"tsd-lite-cli default colored tap output\")\n\n[intro_tsd]: https://github.com/SamVerschueren/tsd\n[intro_tsd-lite]: https://github.com/mrazauskas/tsd-lite\n[intro_fast-glob]: https://github.com/mrmlnc/fast-glob\n[intro_tap]: https://testanything.org\n\n## Table of Contents\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Install](#install)\n  * [`tsd-lite`](#tsd-lite)\n  * [`@tsd/typescript`](#tsdtypescript)\n* [Usage](#usage)\n  * [CLI interface](#cli-interface)\n    * [`--color` and `--no-color`](#--color-and---no-color)\n* [Similar projects](#similar-projects)\n* [Changelog](#changelog)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## Install\n\n```bash\nnpm install --save-dev @tsd/typescript tsd-lite tsd-lite-cli\n```\n\nBesides `tsd-lite-cli`, `tsd-lite` and `@tsd/typescript` are peer dependencies\nand must be installed as well.\n\n### `tsd-lite`\n\nContains the actual assertion functions. For more information, see\n[`tsd-lite`][install_tsd-lite].\n\n```typescript\n// src/concat.test-d.ts\nimport { expectType, expectError } from \"tsd-lite\"\nimport concat from \"./concat.js\"\n\nexpectType\u003cPromise\u003cstring\u003e\u003e(concat(\"foo\", \"bar\"))\nexpectType\u003cstring\u003e(await concat(\"foo\", \"bar\"))\nexpectError(await concat(true, false))\n```\n\n[install_tsd-lite]: https://github.com/mrazauskas/tsd-lite\n\n### `@tsd/typescript`\n\nCompiles the TypeScript test files. It's version should be synced with the\n`typescript` version in your project. For more information, see\n[`@tsd/typescript`][install_tsd-typescript].\n\n[install_tsd-typescript]: https://github.com/SamVerschueren/tsd-typescript\n\n## Usage\n\nRun `tsd-lite` with a glob pattern for matching test files - uses\n[`fast-glob`][usage_fast-glob] internally:\n\n```bash\nnpx tsd-lite 'src/**/*.test-d.ts'\n```\n\n[usage_fast-glob]: https://github.com/mrmlnc/fast-glob\n\n### CLI interface\n\n```console\n$ npx tsd-lite --help\n\nUsage: tsd-lite [options] \u003cpatterns...\u003e\n\nTest runner for testing TypeScript typings (CLI over tsd-lite, a \"per file\"\nversion of tsd)\n\nArguments:\n  patterns       Glob patterns for matching test files\n\nOptions:\n  -v, --version  Print version number\n  -c, --color    Output colored TAP for better human consumption. Disabled in\n                 CI environments if not explicitly set (default: true)\n  --no-color     Disable colored TAP, usefull when piping to other tools\n  -h, --help     Print this help guide\n```\n\n#### `--color` and `--no-color`\n\nBy default, `tsd-lite-cli` outputs a colored version of [Test Anything\nProtocol][cli_tap] for better readability. Can be disabled by setting\n`--no-color` when piping to other tools, e.g. [`tap-spec`][cli_tap-spec].\n\n```bash\nnpx tsd-lite 'src/**/*.test-d.ts' --no-color\n```\n\n![tsd-lite-cli --no-color output](docs/output-no-color.png \"tsd-lite-cli\n--no-color output\")\n\n```bash\nnpx tsd-lite 'src/**/*.test-d.ts' --no-color | npx tap-spec\n```\n\n![tsd-lite-cli --no-color output piped to\ntap-spec](docs/output-no-color_tap-spec.png \"tsd-lite-cli --no-color output\npiped to tap-spec\")\n\n[cli_tap]: https://testanything.org\n[cli_tap-spec]: https://github.com/scottcorgan/tap-spec\n\n## Similar projects\n\n- [`jest-runner-tsd`][similar_jest-runner-tsd] - Jest runner to test TypeScript\n  typings\n\n[similar_jest-runner-tsd]: https://github.com/jest-community/jest-runner-tsd\n\n## Changelog\n\nSee the [releases section](https://github.com/asd-xiv/tsd-lite-cli/releases)\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasd-xiv%2Ftsd-lite-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasd-xiv%2Ftsd-lite-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasd-xiv%2Ftsd-lite-cli/lists"}