{"id":23584065,"url":"https://github.com/xc2/vitest-types","last_synced_at":"2026-02-15T16:33:51.604Z","repository":{"id":269203923,"uuid":"906359427","full_name":"xc2/vitest-types","owner":"xc2","description":"Zero dependencies TypeScript declarations package for vitest 2 and 3.","archived":false,"fork":false,"pushed_at":"2025-01-19T13:37:33.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T11:41:54.890Z","etag":null,"topics":["typescript-definitions","vitest"],"latest_commit_sha":null,"homepage":"https://npm.im/vitest-types","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xc2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-20T18:12:19.000Z","updated_at":"2025-01-19T13:35:08.000Z","dependencies_parsed_at":"2024-12-21T18:32:17.459Z","dependency_job_id":"8565fb4d-6d02-485b-8463-96153f42ca89","html_url":"https://github.com/xc2/vitest-types","commit_stats":null,"previous_names":["xc2/vitest-types"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/xc2/vitest-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xc2%2Fvitest-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xc2%2Fvitest-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xc2%2Fvitest-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xc2%2Fvitest-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xc2","download_url":"https://codeload.github.com/xc2/vitest-types/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xc2%2Fvitest-types/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29484656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["typescript-definitions","vitest"],"created_at":"2024-12-27T02:19:17.538Z","updated_at":"2026-02-15T16:33:51.566Z","avatar_url":"https://github.com/xc2.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vitest-types\n\nThis package allows you to use `import { expect, test, ... } from \"vitest\"` statements in your ts test files without needing to add `vitest` to your `dependencies` or `devDependencies` lists.\n\nSupported versions:\n- vitest 2.x\n- vitest 3.x\n\n\u003e [!NOTE]\n\u003e Vitest Node APIs are not included in this package. You will still need to install `vitest` to use them. For example:\n\u003e\n\u003e - `vitest/node`\n\u003e - `vitest/config`\n\n## Installation\n\n```sh\npnpm/yarn/npm add --save-dev vitest-types\n```\n\n### vitest 2.x\n\nThen add `vitest-types/2` to `compilerOptions.types` list in the `tsconfig.json`. For example:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\"vitest-types/2\"]\n  }\n}\n```\n\n### vitest 3.x\n\nThen add `vitest-types/3` to `compilerOptions.types` list in the `tsconfig.json`. For example:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\"vitest-types/3\"]\n  }\n}\n```\n\nNow you can use `import { expect, test, ... } from \"vitest\"` in your test files.\n\n```ts\n// a.test.ts\nimport { expect, test } from \"vitest\";\n\ntest('foo', () =\u003e {\n  expect(1).toBe(1);\n})\n```\n\n## APIs Global Injection\n\nWhen you're running vitest with apis global injection(`--globals`), you should also add `vitest-types/2/globals`/`vitest-types/3/globals` to the `compilerOptions.types` list. For example:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\"vitest-types/2/globals\"]\n  }\n}\n```\n\n```ts\n// a.test.ts\ntest('foo', () =\u003e {\n  expect(1).toBe(1);\n})\n```\n\n## License\n\n[MIT ©️ xc2](https://tldr.ws/mitxc2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxc2%2Fvitest-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxc2%2Fvitest-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxc2%2Fvitest-types/lists"}