Skip to content

Commit

Permalink
chore: add explicit type for var exports
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 2, 2024
1 parent 6e82b09 commit af26e40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/auto.ts
Original file line number Diff line number Diff line change
@@ -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[];
Expand All @@ -13,7 +14,7 @@ type InferEntriesResult = {
warnings: string[];
};

export const autoPreset = definePreset(() => {
export const autoPreset: BuildPreset = definePreset(() => {
return {
hooks: {
"build:prepare"(ctx): void {
Expand Down
2 changes: 1 addition & 1 deletion src/builders/rollup/utils.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit af26e40

Please sign in to comment.