diff --git a/src/index.d.ts b/src/index.d.ts index c0a52f0..c35984e 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,3 +1,8 @@ +export type PackwatchArguments = { + cwd?: string + isUpdatingManifest?: boolean +} + export type Report = { packageSize: string unpackedSize?: string diff --git a/src/index.ts b/src/index.ts index c08abf2..a41a650 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,16 +6,14 @@ import { getCurrentPackageStats, getPreviousPackageStats, } from './utils' +import type { PackwatchArguments } from './index.d' const MANIFEST_FILENAME = '.packwatch.json' export default async function packwatch({ cwd, isUpdatingManifest, -}: { - cwd?: string - isUpdatingManifest?: boolean -}): Promise { +}: PackwatchArguments): Promise { const packageJsonPath = resolve(join(cwd, 'package.json')) const manifestPath = resolve(join(cwd, MANIFEST_FILENAME))