Skip to content

Commit

Permalink
chore: fix typescript issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpza committed Jan 18, 2025
1 parent 1a1135a commit 12567d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"scripts": {
"prepack": "pnpm build",
"build": "pkgroll --clean-dist",
"lint": "pnpm run /lint:.*/",
"lint:typescript": "pnpm -r exec tsc --noEmit",
"lint": "pnpm run build && pnpm run /lint:.*/",
"lint:typescript": "tsc --noEmit && pnpm -r exec tsc --noEmit",
"lint:prettier": "prettier --check .",
"test": "vitest",
"release": "changelogen --release --push"
Expand Down
5 changes: 3 additions & 2 deletions src/globalSetup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { GlobalSetupContext } from "vitest/node";
import type { GlobalSetupContext } from "vitest/node" with { "resolution-mode": "require" };

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

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

declare module "vitest" {
export interface ProvidedContext {
Expand All @@ -13,6 +13,7 @@ declare module "vitest" {

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

// @ts-ignore
declare module "vitest/node" {
export interface ResolvedConfig {
vitestMms?: {
Expand Down
6 changes: 4 additions & 2 deletions src/globalSetupReplSet.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { GlobalSetupContext } from "vitest/node";
import type { GlobalSetupContext } from "vitest/node" with { "resolution-mode": "require" };

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

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

declare module "vitest" {
export interface ProvidedContext {
Expand All @@ -13,8 +13,10 @@ declare module "vitest" {

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

// @ts-ignore
declare module "vitest/node" {
export interface ResolvedConfig {
// @ts-ignore
vitestMms?: {
mongodbMemoryServerOptions: MongoMemoryServerOpts;
};
Expand Down

0 comments on commit 12567d6

Please sign in to comment.