Skip to content

Commit 12567d6

Browse files
committed
chore: fix typescript issues
1 parent 1a1135a commit 12567d6

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"scripts": {
5555
"prepack": "pnpm build",
5656
"build": "pkgroll --clean-dist",
57-
"lint": "pnpm run /lint:.*/",
58-
"lint:typescript": "pnpm -r exec tsc --noEmit",
57+
"lint": "pnpm run build && pnpm run /lint:.*/",
58+
"lint:typescript": "tsc --noEmit && pnpm -r exec tsc --noEmit",
5959
"lint:prettier": "prettier --check .",
6060
"test": "vitest",
6161
"release": "changelogen --release --push"

src/globalSetup.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { GlobalSetupContext } from "vitest/node";
1+
import type { GlobalSetupContext } from "vitest/node" with { "resolution-mode": "require" };
22

33
import { MongoMemoryServer } from "mongodb-memory-server";
44

55
export type { ProvidedContext } from "vitest";
6-
export type { ResolvedConfig } from "vitest/node";
6+
export type { ResolvedConfig } from "vitest/node" with { "resolution-mode": "require" };
77

88
declare module "vitest" {
99
export interface ProvidedContext {
@@ -13,6 +13,7 @@ declare module "vitest" {
1313

1414
type MongoMemoryServerOpts = Parameters<typeof MongoMemoryServer.create>[0];
1515

16+
// @ts-ignore
1617
declare module "vitest/node" {
1718
export interface ResolvedConfig {
1819
vitestMms?: {

src/globalSetupReplSet.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { GlobalSetupContext } from "vitest/node";
1+
import type { GlobalSetupContext } from "vitest/node" with { "resolution-mode": "require" };
22

33
import { MongoMemoryReplSet } from "mongodb-memory-server";
44

55
export type { ProvidedContext } from "vitest";
6-
export type { ResolvedConfig } from "vitest/node";
6+
export type { ResolvedConfig } from "vitest/node" with { "resolution-mode": "require" };
77

88
declare module "vitest" {
99
export interface ProvidedContext {
@@ -13,8 +13,10 @@ declare module "vitest" {
1313

1414
type MongoMemoryServerOpts = Parameters<typeof MongoMemoryReplSet.create>[0];
1515

16+
// @ts-ignore
1617
declare module "vitest/node" {
1718
export interface ResolvedConfig {
19+
// @ts-ignore
1820
vitestMms?: {
1921
mongodbMemoryServerOptions: MongoMemoryServerOpts;
2022
};

0 commit comments

Comments
 (0)