diff options
| author | ST-DDT <[email protected]> | 2023-02-20 12:43:26 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-20 11:43:26 +0000 |
| commit | 0eba320543ea1e832a55c70e0025e924d3826812 (patch) | |
| tree | 0e7dc18f0364f25fb842e91fc8fc6d5181cfc7f1 /src/modules | |
| parent | be5bd5ccbe9d24e8386158e16f8320f940bc6ffd (diff) | |
| download | faker-0eba320543ea1e832a55c70e0025e924d3826812.tar.xz faker-0eba320543ea1e832a55c70e0025e924d3826812.zip | |
chore: turn on noImplicitThis (#1842)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/helpers/index.ts | 2 | ||||
| -rw-r--r-- | src/modules/helpers/unique.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 55732f4a..4f1c164d 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -915,7 +915,7 @@ export class HelpersModule { ) => RecordKey >( method: Method, - args?: Parameters<Method>, + args: Parameters<Method> = [] as Parameters<Method>, options: { /** * This parameter does nothing. diff --git a/src/modules/helpers/unique.ts b/src/modules/helpers/unique.ts index ebd1b88e..26f1b6d0 100644 --- a/src/modules/helpers/unique.ts +++ b/src/modules/helpers/unique.ts @@ -143,7 +143,7 @@ export function exec< } // Execute the provided method to find a potential satisfied value. - const result: ReturnType<Method> = method.apply(this, args); + const result: ReturnType<Method> = method(...args) as ReturnType<Method>; // If the result has not been previously found, add it to the found array and return the value as it's unique. if (compare(store, result) === -1 && exclude.indexOf(result) === -1) { |
