Skip to content

Commit

Permalink
fix: do not use implicit any (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
sublimator authored and keithamus committed Jan 9, 2020
1 parent 396ed8a commit 77bc5d9
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

type ComparatorFunction = (left: string, right: string) => number

declare namespace sortPackageJson {
Expand All @@ -8,27 +10,31 @@ declare namespace sortPackageJson {

declare const sortPackageJson: {
/**
Sort packageJson.
Sort packageJson.
@param packageJson - A packageJson object or string.
@param options
@returns Sorted packageJson object or string.
*/

@param packageJson - A packageJson object or string.
@returns Sorted packageJson object or string.
*/
(packageJson, options?: sortPackageJson.Options): typeof packageJson
<T extends any>(packageJson: T, options?: sortPackageJson.Options): T

/**
Sort packageJson.
Sort packageJson.
@param packageJson - A packageJson object or string.
@param options
@returns Sorted packageJson object or string.
*/

@param packageJson - A packageJson object or string.
@returns Sorted packageJson object or string.
*/
sortPackageJson(
packageJson,
options?: sortPackageJson.Options,
): typeof packageJson
sortPackageJson<T extends any>(
packageJson: T,
options?: sortPackageJson.Options
): T

/**
Default sort order.
*/
Default sort order.
*/
readonly sortOrder: readonly string[]
}

Expand Down

0 comments on commit 77bc5d9

Please sign in to comment.