Skip to content

Commit

Permalink
fix(vitest): Add import-meta.d.ts (#4571)
Browse files Browse the repository at this point in the history
  • Loading branch information
macdaddyaz authored Nov 27, 2023
1 parent ed50a94 commit dd80288
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vitest/import-meta.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference path="./importMeta.d.ts" />

// https://github.com/microsoft/TypeScript/issues/45096
// TypeScript has a bug that makes <reference types="vite/types/importMeta" />
// not possible in userland. This file provides a workaround for now.
3 changes: 3 additions & 0 deletions packages/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"./importMeta": {
"types": "./importMeta.d.ts"
},
"./import-meta": {
"types": "./import-meta.d.ts"
},
"./node": {
"types": "./dist/node.d.ts",
"default": "./dist/node.js"
Expand Down

0 comments on commit dd80288

Please sign in to comment.