From af26e404b50124794e182693d84827a7c5c24777 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 2 Jul 2024 15:06:29 +0200 Subject: [PATCH] chore: add explicit type for var exports --- src/auto.ts | 7 ++++--- src/builders/rollup/utils.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/auto.ts b/src/auto.ts index 0dc70704..9fe9f313 100644 --- a/src/auto.ts +++ b/src/auto.ts @@ -1,10 +1,11 @@ +import type { PackageJson } from "pkg-types"; +import type { BuildEntry, BuildPreset, MkdistBuildEntry } from "./types"; import { existsSync } from "node:fs"; import { normalize, join, resolve } from "pathe"; import { consola } from "consola"; import chalk from "chalk"; -import type { PackageJson } from "pkg-types"; +import { definePreset } from "./types"; import { extractExportFilenames, listRecursively, warn } from "./utils"; -import { BuildEntry, definePreset, MkdistBuildEntry } from "./types"; type InferEntriesResult = { entries: BuildEntry[]; @@ -13,7 +14,7 @@ type InferEntriesResult = { warnings: string[]; }; -export const autoPreset = definePreset(() => { +export const autoPreset: BuildPreset = definePreset(() => { return { hooks: { "build:prepare"(ctx): void { diff --git a/src/builders/rollup/utils.ts b/src/builders/rollup/utils.ts index f2f2d310..29083a1e 100644 --- a/src/builders/rollup/utils.ts +++ b/src/builders/rollup/utils.ts @@ -1,7 +1,7 @@ import type { PreRenderedChunk } from "rollup"; import type { BuildContext } from "../../types"; -export const DEFAULT_EXTENSIONS = [ +export const DEFAULT_EXTENSIONS: string[] = [ ".ts", ".tsx", ".mts",