Upakovka v Electron.JS no po staroy sborke cherez .cjs

This commit is contained in:
Neyra
2026-02-10 19:19:41 +08:00
parent 8e9b7201ed
commit a1bba1d3d1
442 changed files with 19825 additions and 47462 deletions

41
node_modules/onetime/index.d.ts generated vendored
View File

@@ -1,26 +1,28 @@
export type Options = {
/**
Throw an error when called more than once.
declare namespace onetime {
interface Options {
/**
Throw an error when called more than once.
@default false
*/
readonly throw?: boolean;
};
@default false
*/
throw?: boolean;
}
}
declare const onetime: {
/**
Ensure a function is only called once. When called multiple times it will return the return value from the first call.
@param fn - The function that should only be called once.
@param fn - Function that should only be called once.
@returns A function that only calls `fn` once.
@example
```
import onetime from 'onetime';
import onetime = require('onetime');
let index = 0;
let i = 0;
const foo = onetime(() => ++index);
const foo = onetime(() => ++i);
foo(); //=> 1
foo(); //=> 1
@@ -30,19 +32,19 @@ declare const onetime: {
```
*/
<ArgumentsType extends unknown[], ReturnType>(
fn: (...arguments_: ArgumentsType) => ReturnType,
options?: Options
): (...arguments_: ArgumentsType) => ReturnType;
fn: (...arguments: ArgumentsType) => ReturnType,
options?: onetime.Options
): (...arguments: ArgumentsType) => ReturnType;
/**
Get the number of times `fn` has been called.
@param fn - The function to get call count from.
@param fn - Function to get call count from.
@returns A number representing how many times `fn` has been called.
@example
```
import onetime from 'onetime';
import onetime = require('onetime');
const foo = onetime(() => {});
foo();
@@ -53,7 +55,10 @@ declare const onetime: {
//=> 3
```
*/
callCount(fn: (...arguments_: any[]) => unknown): number;
callCount(fn: (...arguments: any[]) => unknown): number;
// TODO: Remove this for the next major release
default: typeof onetime;
};
export default onetime;
export = onetime;