Skip to content

Commit

Permalink
Add sizeLimitAPI function to index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Mar 12, 2024
1 parent afc1998 commit c6174ba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/size-limit/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,22 @@ export interface Check {
}

export type SizeLimitConfig = Check[]

/**
* Any function with any arguments.
*/
type AnyFunction = (...args: any[]) => any

/**
* Run Size Limit and return the result.
*
* @param plugins The list of plugins like `@size-limit/time`
* @param files Path to files or internal config
* @return Project size
*/
declare function sizeLimitAPI(
plugins: AnyFunction,
files: string[] | object
): Promise<object>

export default sizeLimitAPI

0 comments on commit c6174ba

Please sign in to comment.