Skip to content

Commit

Permalink
fix type defs
Browse files Browse the repository at this point in the history
Without this change I see errors such as:

```
../file.js:20:23 - error TS2339: Property 'call' does not exist on type 'typeof import("/path/to/node_modules/merge-options/index")'.

20   return mergeOptions.call(
                         ~~~~
```

and

```
../file.js:56:19 - error TS2349: This expression is not callable.
  Type 'typeof import("/path/to/node_modules/merge-options/index")' has no call signatures.

56         options = mergeOptions(constructorOptions.init, options)
                     ~~~~~~~~~~~~
```

and

```
../file.js:8:47 - error TS2339: Property 'bind' does not exist on type 'typeof import("/path/to/node_modules/merge-options/index")'.

8 const mergeOptions = require('merge-options').bind({ ignoreUndefined: true })
                                                ~~~~
```
  • Loading branch information
achingbrain committed Nov 6, 2020
1 parent 9bca947 commit b000391
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
@@ -1 +1,3 @@
export default function (...options: any[]): any;
export = mergeOptions;

declare function mergeOptions<T>(...options: any[]): T;

0 comments on commit b000391

Please sign in to comment.