Skip to content

Commit

Permalink
#242: uniqueArray(): Fix an ESLint error.
Browse files Browse the repository at this point in the history
The error was:
ESLint: Unexpected any. Specify a different type.(@typescript-eslint/no-explicit-any)
  • Loading branch information
Taitava committed Mar 4, 2023
1 parent 66c1ca4 commit 34b7f1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export function joinObjectProperties(object: {}, glue: string) {
*
* Idea is copied 2021-10-06 from https://stackoverflow.com/a/33121880/2754026
*/
export function uniqueArray(array: any[]) {
export function uniqueArray<Type>(array: Type[]): Type[] {
return [...new Set(array)];
}

Expand Down

0 comments on commit 34b7f1a

Please sign in to comment.