Bump @ava/typescript from 3.0.1 to 4.0.0 (#1576)
* Bump @ava/typescript from 3.0.1 to 4.0.0 Bumps [@ava/typescript](https://github.com/avajs/typescript) from 3.0.1 to 4.0.0. - [Release notes](https://github.com/avajs/typescript/releases) - [Commits](https://github.com/avajs/typescript/compare/v3.0.1...v4.0.0) --- updated-dependencies: - dependency-name: "@ava/typescript" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update checked-in dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions@github.com>
This commit is contained in:
parent
ec298233c1
commit
19f00dc212
68 changed files with 2374 additions and 1754 deletions
29
node_modules/onetime/index.d.ts
generated
vendored
29
node_modules/onetime/index.d.ts
generated
vendored
|
|
@ -1,12 +1,10 @@
|
|||
declare namespace onetime {
|
||||
interface Options {
|
||||
/**
|
||||
Throw an error when called more than once.
|
||||
export interface Options {
|
||||
/**
|
||||
Throw an error when called more than once.
|
||||
|
||||
@default false
|
||||
*/
|
||||
throw?: boolean;
|
||||
}
|
||||
@default false
|
||||
*/
|
||||
readonly throw?: boolean;
|
||||
}
|
||||
|
||||
declare const onetime: {
|
||||
|
|
@ -18,11 +16,11 @@ declare const onetime: {
|
|||
|
||||
@example
|
||||
```
|
||||
import onetime = require('onetime');
|
||||
import onetime from 'onetime';
|
||||
|
||||
let i = 0;
|
||||
let index = 0;
|
||||
|
||||
const foo = onetime(() => ++i);
|
||||
const foo = onetime(() => ++index);
|
||||
|
||||
foo(); //=> 1
|
||||
foo(); //=> 1
|
||||
|
|
@ -33,7 +31,7 @@ declare const onetime: {
|
|||
*/
|
||||
<ArgumentsType extends unknown[], ReturnType>(
|
||||
fn: (...arguments: ArgumentsType) => ReturnType,
|
||||
options?: onetime.Options
|
||||
options?: Options
|
||||
): (...arguments: ArgumentsType) => ReturnType;
|
||||
|
||||
/**
|
||||
|
|
@ -44,7 +42,7 @@ declare const onetime: {
|
|||
|
||||
@example
|
||||
```
|
||||
import onetime = require('onetime');
|
||||
import onetime from 'onetime';
|
||||
|
||||
const foo = onetime(() => {});
|
||||
foo();
|
||||
|
|
@ -56,9 +54,6 @@ declare const onetime: {
|
|||
```
|
||||
*/
|
||||
callCount(fn: (...arguments: any[]) => unknown): number;
|
||||
|
||||
// TODO: Remove this for the next major release
|
||||
default: typeof onetime;
|
||||
};
|
||||
|
||||
export = onetime;
|
||||
export default onetime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue