From da7571fba506b9e72161d72aaafd9c7b0be64059 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Fri, 19 Feb 2021 02:03:16 -0500 Subject: [PATCH] chore: type args --- src/index.d.ts | 5 +++++ src/index.ts | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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))