typenative 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/node/assert.js +2 -2
- package/bin/node/child_process.js +66 -8
- package/bin/node/fs.js +1012 -4
- package/bin/node/histogram.js +1991 -0
- package/bin/node/process.js +14 -2
- package/bin/node/sqlite.js +1488 -5
- package/bin/node/stream.js +2 -1
- package/bin/node/system_extra.js +3 -270
- package/bin/node/test.js +39 -1
- package/bin/node/test_report.js +47 -1
- package/bin/node/test_run.js +57 -2
- package/bin/node/util.js +8 -5
- package/bin/node/webassembly.js +20 -5
- package/bin/node/webview.js +3257 -244
- package/bin/node/zlib.js +118 -14
- package/bin/node/zlib_iter.js +585 -0
- package/bin/transpiler.js +1370 -258
- package/bin/version.js +1 -1
- package/govendor/software.sslmate.com/src/go-pkcs12/.gitattributes +10 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/LICENSE +28 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/README.md +31 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/bmp-string.go +63 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/crypto.go +331 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/errors.go +23 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/go.mod +3 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/internal/rc2/rc2.go +271 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/mac.go +202 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/pbkdf.go +184 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/pkcs12.go +1000 -0
- package/govendor/software.sslmate.com/src/go-pkcs12/safebags.go +107 -0
- package/package.json +10 -1
- package/types/tsconfig.json +17 -0
- package/types/typenative-npm.d.ts +492 -12
- package/types/typenative.d.ts +88 -2
- package/.gitattributes +0 -1
- package/.github/workflows/ci.yml +0 -68
- package/.github/workflows/npm-publish-github-packages.yml +0 -88
- package/CHANGELOG.md +0 -1746
- package/CONTRIBUTION.md +0 -133
- package/conformance.md +0 -1497
- package/examples/README.md +0 -114
- package/examples/angular-templates/README.md +0 -141
- package/examples/angular-templates/bench.mjs +0 -173
- package/examples/angular-templates/dom-type-globals.d.ts +0 -21
- package/examples/angular-templates/dom-type-stubs.ts +0 -21
- package/examples/angular-templates/main.ts +0 -135
- package/examples/angular-templates/parity.mjs +0 -157
- package/examples/angular-templates/run-node.mjs +0 -69
- package/examples/angular-templates/vendor/angular/compiler/LICENSE +0 -21
- package/examples/desktop-notes/README.md +0 -106
- package/examples/desktop-notes/bench.mjs +0 -125
- package/examples/desktop-notes/main.ts +0 -131
- package/examples/desktop-notes/package-lock.json +0 -726
- package/examples/desktop-notes/package.json +0 -9
- package/examples/desktop-notes/ui.ts +0 -176
- package/examples/dupe-finder/README.md +0 -78
- package/examples/dupe-finder/bench.mjs +0 -120
- package/examples/dupe-finder/main.ts +0 -87
- package/examples/fibonacci/README.md +0 -89
- package/examples/fibonacci/bench.mjs +0 -87
- package/examples/fibonacci/main.ts +0 -21
- package/examples/hello-world/README.md +0 -62
- package/examples/hello-world/bench.mjs +0 -66
- package/examples/hello-world/main.ts +0 -7
- package/examples/json-server/README.md +0 -132
- package/examples/json-server/bench.mjs +0 -263
- package/examples/json-server/main.ts +0 -67
- package/examples/mandelbrot-png/README.md +0 -63
- package/examples/mandelbrot-png/bench.mjs +0 -95
- package/examples/mandelbrot-png/main.ts +0 -98
- package/examples/mandelbrot-png/preview.png +0 -0
- package/examples/marked-cli/README.md +0 -174
- package/examples/marked-cli/bench.mjs +0 -178
- package/examples/marked-cli/main.ts +0 -410
- package/examples/marked-cli/parity.mjs +0 -185
- package/examples/marked-cli/vendor/marked/LICENSE +0 -44
- package/examples/marked-cli/vendor/marked/VENDOR.md +0 -26
- package/examples/openai-chat/README.md +0 -148
- package/examples/openai-chat/bench.mjs +0 -175
- package/examples/openai-chat/main.ts +0 -488
- package/examples/react-compiler/README.md +0 -185
- package/examples/react-compiler/bench.mjs +0 -181
- package/examples/react-compiler/main.ts +0 -324
- package/examples/react-compiler/parity.mjs +0 -362
- package/examples/react-compiler/run-node.mjs +0 -90
- package/examples/react-compiler/vendor/babel/LICENSE +0 -22
- package/examples/react-compiler/vendor/babel/helper-globals/data/builtin-lower.json +0 -15
- package/examples/react-compiler/vendor/babel/helper-globals/data/builtin-upper.json +0 -51
- package/examples/react-compiler/vendor/charcodes/package.json +0 -25
- package/examples/react-compiler/vendor/invariant/LICENSE +0 -21
- package/examples/react-compiler/vendor/invariant/invariant.cjs +0 -51
- package/examples/react-compiler/vendor/invariant/invariant.d.cts +0 -11
- package/examples/react-compiler/vendor/invariant/types/LICENSE +0 -21
- package/examples/react-compiler/vendor/jridgewell/gen-mapping/LICENSE +0 -19
- package/examples/react-compiler/vendor/jridgewell/resolve-uri/LICENSE +0 -19
- package/examples/react-compiler/vendor/jridgewell/sourcemap-codec/LICENSE +0 -19
- package/examples/react-compiler/vendor/jridgewell/trace-mapping/LICENSE +0 -19
- package/examples/react-compiler/vendor/js-tokens/LICENSE +0 -21
- package/examples/react-compiler/vendor/js-tokens/index.cjs +0 -23
- package/examples/react-compiler/vendor/js-tokens/index.d.cts +0 -13
- package/examples/react-compiler/vendor/jsesc/LICENSE-MIT.txt +0 -20
- package/examples/react-compiler/vendor/jsesc/jsesc.cjs +0 -337
- package/examples/react-compiler/vendor/jsesc/jsesc.d.cts +0 -384
- package/examples/react-compiler/vendor/jsesc/types/LICENSE +0 -21
- package/examples/react-compiler/vendor/picocolors/LICENSE +0 -15
- package/examples/react-compiler/vendor/picocolors/picocolors.cjs +0 -75
- package/examples/react-compiler/vendor/picocolors/picocolors.d.cts +0 -5
- package/examples/react-compiler/vendor/picocolors/types.d.ts +0 -51
- package/examples/react-compiler/vendor/react-compiler/LICENSE +0 -21
- package/examples/react-compiler/vendor/stubs/babel-core.ts +0 -31
- package/examples/react-compiler/vendor/stubs/debug.ts +0 -18
- package/examples/react-compiler/vendor/stubs/js-tokens.d.ts +0 -13
- package/examples/react-compiler/vendor/stubs/pretty-format.ts +0 -18
- package/examples/react-compiler/vendor/zod/LICENSE +0 -21
- package/examples/react-compiler/vendor/zod-validation-error/LICENSE +0 -9
- package/examples/react-compiler/vendor/zod-validation-error/lib/utils/NonEmptyArray.ts +0 -5
- package/examples/react-compiler/vendor/zod-validation-error/lib/utils/joinPath.ts +0 -49
- package/examples/react-compiler/vendor/zod-validation-error/lib/utils/joinValues.ts +0 -48
- package/examples/react-compiler/vendor/zod-validation-error/lib/utils/stringify.ts +0 -50
- package/examples/react-compiler/vendor/zod-validation-error/lib/utils/titleCase.ts +0 -6
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/MessageBuilder.ts +0 -126
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/ValidationError.ts +0 -39
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/custom.ts +0 -12
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/errorMap.ts +0 -78
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/index.ts +0 -2
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidElement.ts +0 -12
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidKey.ts +0 -12
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidStringFormat.ts +0 -131
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidType.ts +0 -54
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidUnion.ts +0 -12
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/invalidValue.ts +0 -40
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/notMultipleOf.ts +0 -12
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/tooBig.ts +0 -76
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/tooSmall.ts +0 -76
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/types.ts +0 -27
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/errorMap/unrecognizedKeys.ts +0 -27
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/fromError.ts +0 -13
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/fromZodError.ts +0 -61
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/fromZodIssue.ts +0 -38
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/index.ts +0 -20
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/isValidationError.ts +0 -5
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/isValidationErrorLike.ts +0 -8
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/isZodErrorLike.ts +0 -11
- package/examples/react-compiler/vendor/zod-validation-error/lib/v4/toValidationError.ts +0 -20
- package/examples/react-compiler/vendor.mjs +0 -688
- package/examples/todo-cli/README.md +0 -69
- package/examples/todo-cli/bench.mjs +0 -89
- package/examples/todo-cli/main.ts +0 -92
- package/examples/yaml-cli/README.md +0 -152
- package/examples/yaml-cli/bench.mjs +0 -265
- package/examples/yaml-cli/main.ts +0 -251
- package/examples/yaml-cli/parity.mjs +0 -156
- package/examples/yaml-cli/vendor/yaml/LICENSE +0 -13
- package/examples/yaml-cli/vendor/yaml/VENDOR.md +0 -25
- package/performance/README.md +0 -248
- package/performance/any-dynamic.ts +0 -21
- package/performance/any-record-view.ts +0 -20
- package/performance/arr-for-of.ts +0 -29
- package/performance/arr-hof.ts +0 -21
- package/performance/arr-push-index.ts +0 -15
- package/performance/arr-push-local.ts +0 -39
- package/performance/arr-slice-concat.ts +0 -24
- package/performance/arr-sort.ts +0 -21
- package/performance/async-await.ts +0 -24
- package/performance/async-promise-all.ts +0 -38
- package/performance/bigint-arith.ts +0 -36
- package/performance/buf-encode.ts +0 -29
- package/performance/class-accessors.ts +0 -48
- package/performance/class-dispatch.ts +0 -52
- package/performance/date-format.ts +0 -18
- package/performance/events-emit.ts +0 -27
- package/performance/exc-throw-rare.ts +0 -25
- package/performance/exc-try-catch.ts +0 -26
- package/performance/fn-closures.ts +0 -29
- package/performance/fn-recursion-tree.ts +0 -31
- package/performance/fn-rest-spread.ts +0 -43
- package/performance/gen-for-of.ts +0 -46
- package/performance/gen-next.ts +0 -32
- package/performance/iter-helpers.ts +0 -38
- package/performance/json-any.ts +0 -30
- package/performance/json-roundtrip.ts +0 -27
- package/performance/map-delete.ts +0 -24
- package/performance/map-iterate.ts +0 -26
- package/performance/map-number-keys.ts +0 -37
- package/performance/map-string-keys.ts +0 -22
- package/performance/num-arith-loop.ts +0 -14
- package/performance/num-bitwise.ts +0 -21
- package/performance/num-hash-imul.ts +0 -36
- package/performance/num-mod-int.ts +0 -16
- package/performance/num-to-string.ts +0 -16
- package/performance/obj-alloc.ts +0 -32
- package/performance/obj-keys-entries.ts +0 -44
- package/performance/obj-optional-chain.ts +0 -42
- package/performance/obj-record-dict.ts +0 -24
- package/performance/obj-spread-destructure.ts +0 -40
- package/performance/regex-exec.ts +0 -29
- package/performance/regex-replace-fn.ts +0 -24
- package/performance/regex-site.ts +0 -28
- package/performance/set-ops.ts +0 -20
- package/performance/str-char-scan.ts +0 -35
- package/performance/str-concat-plus.ts +0 -18
- package/performance/str-concat.ts +0 -24
- package/performance/str-methods.ts +0 -24
- package/performance/str-short-scan.ts +0 -26
- package/performance/str-split-join.ts +0 -23
- package/performance/str-switch-compare.ts +0 -50
- package/performance/str-template.ts +0 -16
- package/performance/str-unicode.ts +0 -25
- package/performance/typed-array.ts +0 -30
- package/performance/union-switch.ts +0 -57
- package/performance/union-typeof.ts +0 -40
- package/performance/wasm-call.ts +0 -63
- package/tsparser/check.go +0 -158
- package/tsparser/go.mod +0 -14
- package/tsparser/go.sum +0 -22
- package/tsparser/main.go +0 -363
- package/tsparser/tsparser.exe +0 -4
|
@@ -308,6 +308,39 @@ declare module 'node:fs' {
|
|
|
308
308
|
declare module 'node:fs/promises' {
|
|
309
309
|
import fs = require('node:fs');
|
|
310
310
|
namespace promises {
|
|
311
|
+
interface FilePullOptions {
|
|
312
|
+
autoClose?: boolean;
|
|
313
|
+
chunkSize?: number;
|
|
314
|
+
start?: number;
|
|
315
|
+
limit?: number;
|
|
316
|
+
signal?: AbortSignal;
|
|
317
|
+
}
|
|
318
|
+
interface FilePullSyncOptions {
|
|
319
|
+
autoClose?: boolean;
|
|
320
|
+
chunkSize?: number;
|
|
321
|
+
start?: number;
|
|
322
|
+
limit?: number;
|
|
323
|
+
}
|
|
324
|
+
interface FileWriterOptions {
|
|
325
|
+
autoClose?: boolean;
|
|
326
|
+
chunkSize?: number;
|
|
327
|
+
start?: number;
|
|
328
|
+
limit?: number;
|
|
329
|
+
}
|
|
330
|
+
interface FileWriter {
|
|
331
|
+
write(chunk: string | Uint8Array, options?: { signal?: AbortSignal }): Promise<void>;
|
|
332
|
+
writev(chunks: readonly (string | Uint8Array)[], options?: { signal?: AbortSignal }): Promise<void>;
|
|
333
|
+
writeSync(chunk: string | Uint8Array): boolean;
|
|
334
|
+
writevSync(chunks: readonly (string | Uint8Array)[]): boolean;
|
|
335
|
+
end(options?: { signal?: AbortSignal }): Promise<number>;
|
|
336
|
+
endSync(): number;
|
|
337
|
+
fail(reason?: any): void;
|
|
338
|
+
[Symbol.dispose](): void;
|
|
339
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
340
|
+
}
|
|
341
|
+
type FilePullTransform =
|
|
342
|
+
| ((chunks: Uint8Array[] | null, options?: { signal?: AbortSignal }) => any)
|
|
343
|
+
| { transform(source: any, options?: { signal?: AbortSignal }): any };
|
|
311
344
|
interface FileHandle {
|
|
312
345
|
readonly fd: number;
|
|
313
346
|
readFile(options?: { encoding?: null } | null): Promise<Buffer>;
|
|
@@ -320,6 +353,11 @@ declare module 'node:fs/promises' {
|
|
|
320
353
|
truncate(len?: number): Promise<void>;
|
|
321
354
|
sync(): Promise<void>;
|
|
322
355
|
close(): Promise<void>;
|
|
356
|
+
pull(options?: FilePullOptions): AsyncIterable<Uint8Array[]>;
|
|
357
|
+
pull(...args: (FilePullTransform | FilePullOptions)[]): AsyncIterable<Uint8Array[]>;
|
|
358
|
+
pullSync(options?: FilePullSyncOptions): Iterable<Uint8Array[]>;
|
|
359
|
+
pullSync(...args: (FilePullTransform | FilePullSyncOptions)[]): Iterable<Uint8Array[]>;
|
|
360
|
+
writer(options?: FileWriterOptions): FileWriter;
|
|
323
361
|
}
|
|
324
362
|
const constants: typeof fs.constants;
|
|
325
363
|
function readFile(path: fs.PathLike, options?: { encoding?: null; flag?: string } | null): Promise<Buffer>;
|
|
@@ -1383,6 +1421,40 @@ declare module 'node:zlib' {
|
|
|
1383
1421
|
export = zlib;
|
|
1384
1422
|
}
|
|
1385
1423
|
|
|
1424
|
+
declare module 'node:zlib/iter' {
|
|
1425
|
+
namespace zlibIter {
|
|
1426
|
+
interface SyncTransformObject {
|
|
1427
|
+
transform(source: Iterable<Uint8Array[] | null>): Generator<Uint8Array[], void>;
|
|
1428
|
+
}
|
|
1429
|
+
interface AsyncTransformObject {
|
|
1430
|
+
transform(
|
|
1431
|
+
source: AsyncIterable<Uint8Array[] | null> | Iterable<Uint8Array[] | null>,
|
|
1432
|
+
options?: { signal?: AbortSignal }
|
|
1433
|
+
): AsyncGenerator<Uint8Array[], void>;
|
|
1434
|
+
}
|
|
1435
|
+
type ZlibIterOptions = import('node:zlib').ZlibOptions & { maxOutputLength?: number };
|
|
1436
|
+
type BrotliIterOptions = import('node:zlib').BrotliOptions & { maxOutputLength?: number };
|
|
1437
|
+
type ZstdIterOptions = import('node:zlib').ZstdOptions & { maxOutputLength?: number };
|
|
1438
|
+
function compressGzipSync(options?: ZlibIterOptions): SyncTransformObject;
|
|
1439
|
+
function decompressGzipSync(options?: ZlibIterOptions): SyncTransformObject;
|
|
1440
|
+
function compressDeflateSync(options?: ZlibIterOptions): SyncTransformObject;
|
|
1441
|
+
function decompressDeflateSync(options?: ZlibIterOptions): SyncTransformObject;
|
|
1442
|
+
function compressBrotliSync(options?: BrotliIterOptions): SyncTransformObject;
|
|
1443
|
+
function decompressBrotliSync(options?: BrotliIterOptions): SyncTransformObject;
|
|
1444
|
+
function compressZstdSync(options?: ZstdIterOptions): SyncTransformObject;
|
|
1445
|
+
function decompressZstdSync(options?: ZstdIterOptions): SyncTransformObject;
|
|
1446
|
+
function compressGzip(options?: ZlibIterOptions): AsyncTransformObject;
|
|
1447
|
+
function decompressGzip(options?: ZlibIterOptions): AsyncTransformObject;
|
|
1448
|
+
function compressDeflate(options?: ZlibIterOptions): AsyncTransformObject;
|
|
1449
|
+
function decompressDeflate(options?: ZlibIterOptions): AsyncTransformObject;
|
|
1450
|
+
function compressBrotli(options?: BrotliIterOptions): AsyncTransformObject;
|
|
1451
|
+
function decompressBrotli(options?: BrotliIterOptions): AsyncTransformObject;
|
|
1452
|
+
function compressZstd(options?: ZstdIterOptions): AsyncTransformObject;
|
|
1453
|
+
function decompressZstd(options?: ZstdIterOptions): AsyncTransformObject;
|
|
1454
|
+
}
|
|
1455
|
+
export = zlibIter;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1386
1458
|
declare module 'node:timers' {
|
|
1387
1459
|
namespace timers {
|
|
1388
1460
|
type Timeout = NodeJS.Timeout;
|
|
@@ -1422,15 +1494,73 @@ declare module 'node:perf_hooks' {
|
|
|
1422
1494
|
const PerformanceObserver: typeof globalThis.PerformanceObserver;
|
|
1423
1495
|
type PerformanceObserver = globalThis.PerformanceObserver;
|
|
1424
1496
|
type PerformanceObserverEntryList = globalThis.PerformanceObserverEntryList;
|
|
1497
|
+
interface PercentileCI {
|
|
1498
|
+
readonly value: number;
|
|
1499
|
+
readonly lower: number;
|
|
1500
|
+
readonly upper: number;
|
|
1501
|
+
}
|
|
1502
|
+
interface MeanCI {
|
|
1503
|
+
readonly mean: number;
|
|
1504
|
+
readonly lower: number;
|
|
1505
|
+
readonly upper: number;
|
|
1506
|
+
}
|
|
1507
|
+
interface ConfidenceInterval {
|
|
1508
|
+
readonly lower: number;
|
|
1509
|
+
readonly upper: number;
|
|
1510
|
+
}
|
|
1511
|
+
interface WelchResult {
|
|
1512
|
+
readonly tStatistic: number;
|
|
1513
|
+
readonly degreesOfFreedom: number;
|
|
1514
|
+
readonly pValue: number;
|
|
1515
|
+
readonly confidenceInterval: ConfidenceInterval;
|
|
1516
|
+
}
|
|
1517
|
+
interface MannWhitneyResult {
|
|
1518
|
+
readonly uStatistic: number;
|
|
1519
|
+
readonly zScore: number;
|
|
1520
|
+
readonly pValue: number;
|
|
1521
|
+
}
|
|
1522
|
+
interface QrdeResult {
|
|
1523
|
+
readonly probabilities: Float64Array;
|
|
1524
|
+
readonly quantiles: Float64Array;
|
|
1525
|
+
readonly densities: Float64Array;
|
|
1526
|
+
readonly count: bigint;
|
|
1527
|
+
readonly bucketCount: number;
|
|
1528
|
+
readonly corrections: number;
|
|
1529
|
+
readonly dequantize: 'hdr' | 'none';
|
|
1530
|
+
}
|
|
1425
1531
|
interface Histogram {
|
|
1426
1532
|
readonly count: number;
|
|
1533
|
+
readonly countBigInt: bigint;
|
|
1427
1534
|
readonly min: number;
|
|
1535
|
+
readonly minBigInt: bigint;
|
|
1428
1536
|
readonly max: number;
|
|
1537
|
+
readonly maxBigInt: bigint;
|
|
1429
1538
|
readonly mean: number;
|
|
1430
1539
|
readonly stddev: number;
|
|
1431
1540
|
readonly exceeds: number;
|
|
1541
|
+
readonly exceedsBigInt: bigint;
|
|
1432
1542
|
readonly percentiles: Map<number, number>;
|
|
1543
|
+
readonly percentilesBigInt: Map<number, bigint>;
|
|
1544
|
+
readonly resetCount: number;
|
|
1545
|
+
readonly ewmaMean: number;
|
|
1546
|
+
readonly ewmaStddev: number;
|
|
1547
|
+
readonly ewmaErrorRate: number;
|
|
1433
1548
|
percentile(percentile: number): number;
|
|
1549
|
+
percentileBigInt(percentile: number): bigint;
|
|
1550
|
+
percentilesAt(percentiles: number[]): Map<number, number>;
|
|
1551
|
+
percentileCI(percentile: number, options?: { confidence?: number }): PercentileCI;
|
|
1552
|
+
meanCI(options?: { confidence?: number }): MeanCI;
|
|
1553
|
+
burnRate(sloTarget: number): number;
|
|
1554
|
+
welchTest(other: Histogram, options?: { confidence?: number }): WelchResult;
|
|
1555
|
+
ksTest(other: Histogram): number;
|
|
1556
|
+
mannWhitneyTest(other: Histogram): MannWhitneyResult;
|
|
1557
|
+
cohensD(other: Histogram): number;
|
|
1558
|
+
cliffsD(other: Histogram): number;
|
|
1559
|
+
linearBuckets(stepSize: number): Map<number, number>;
|
|
1560
|
+
logBuckets(start: number, factor: number): Map<number, number>;
|
|
1561
|
+
qrde(options?: { bins?: number; dequantize?: 'hdr' | 'none' }): Promise<QrdeResult>;
|
|
1562
|
+
diff(other: Histogram): Histogram;
|
|
1563
|
+
export(): Uint8Array;
|
|
1434
1564
|
reset(): void;
|
|
1435
1565
|
/** Node 26: skewness / excess kurtosis of the values */
|
|
1436
1566
|
readonly skewness: number;
|
|
@@ -1440,7 +1570,8 @@ declare module 'node:perf_hooks' {
|
|
|
1440
1570
|
/** The share of values at or below value / above it */
|
|
1441
1571
|
cdf(value: number): number;
|
|
1442
1572
|
ccdf(value: number): number;
|
|
1443
|
-
snapshot():
|
|
1573
|
+
snapshot(): Histogram;
|
|
1574
|
+
toJSON(): {
|
|
1444
1575
|
count: number;
|
|
1445
1576
|
min: number;
|
|
1446
1577
|
max: number;
|
|
@@ -1449,6 +1580,9 @@ declare module 'node:perf_hooks' {
|
|
|
1449
1580
|
stddev: number;
|
|
1450
1581
|
skewness: number;
|
|
1451
1582
|
kurtosis: number;
|
|
1583
|
+
ewmaMean: number;
|
|
1584
|
+
ewmaStddev: number;
|
|
1585
|
+
ewmaErrorRate: number;
|
|
1452
1586
|
percentiles: Record<string, number>;
|
|
1453
1587
|
};
|
|
1454
1588
|
}
|
|
@@ -1464,7 +1598,29 @@ declare module 'node:perf_hooks' {
|
|
|
1464
1598
|
enable(): boolean;
|
|
1465
1599
|
disable(): boolean;
|
|
1466
1600
|
}
|
|
1467
|
-
|
|
1601
|
+
interface SlidingWindowHistogram {
|
|
1602
|
+
record(val: number | bigint): void;
|
|
1603
|
+
snapshot(): Histogram;
|
|
1604
|
+
reset(): void;
|
|
1605
|
+
}
|
|
1606
|
+
interface CreateHistogramOptions {
|
|
1607
|
+
lowest?: number | bigint;
|
|
1608
|
+
highest?: number | bigint;
|
|
1609
|
+
figures?: number;
|
|
1610
|
+
halfLife?: number;
|
|
1611
|
+
threshold?: number | bigint;
|
|
1612
|
+
}
|
|
1613
|
+
interface SlidingWindowHistogramOptions {
|
|
1614
|
+
chunks: number;
|
|
1615
|
+
chunkDuration?: number;
|
|
1616
|
+
recordsPerChunk?: number;
|
|
1617
|
+
lowest?: number | bigint;
|
|
1618
|
+
highest?: number | bigint;
|
|
1619
|
+
figures?: number;
|
|
1620
|
+
}
|
|
1621
|
+
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
|
|
1622
|
+
function createSlidingWindowHistogram(options: SlidingWindowHistogramOptions): SlidingWindowHistogram;
|
|
1623
|
+
function importHistogram(data: Uint8Array): RecordableHistogram;
|
|
1468
1624
|
function monitorEventLoopDelay(options?: { resolution?: number }): IntervalHistogram;
|
|
1469
1625
|
}
|
|
1470
1626
|
export = perf_hooks;
|
|
@@ -3423,9 +3579,35 @@ declare module 'node:sqlite' {
|
|
|
3423
3579
|
allowBareNamedParameters?: boolean;
|
|
3424
3580
|
allowUnknownNamedParameters?: boolean;
|
|
3425
3581
|
}
|
|
3582
|
+
interface CreateSessionOptions {
|
|
3583
|
+
table?: string;
|
|
3584
|
+
db?: string;
|
|
3585
|
+
}
|
|
3586
|
+
interface ApplyChangesetOptions {
|
|
3587
|
+
filter?: (tableName: string) => boolean;
|
|
3588
|
+
onConflict?: (conflictType: number) => number;
|
|
3589
|
+
}
|
|
3590
|
+
interface Session {
|
|
3591
|
+
changeset(): Uint8Array;
|
|
3592
|
+
patchset(): Uint8Array;
|
|
3593
|
+
close(): void;
|
|
3594
|
+
[Symbol.dispose](): void;
|
|
3595
|
+
}
|
|
3596
|
+
interface VirtualTableColumn {
|
|
3597
|
+
name: string;
|
|
3598
|
+
type: 'INTEGER' | 'TEXT' | 'REAL' | 'BLOB' | 'ANY';
|
|
3599
|
+
hidden?: boolean;
|
|
3600
|
+
}
|
|
3601
|
+
interface CreateModuleOptions {
|
|
3602
|
+
columns: VirtualTableColumn[];
|
|
3603
|
+
rows: (...args: any[]) => Iterable<SQLInputValue[]>;
|
|
3604
|
+
directOnly?: boolean;
|
|
3605
|
+
useBigIntArguments?: boolean;
|
|
3606
|
+
}
|
|
3426
3607
|
// SQLite runs as Wasm inside the program (github.com/ncruces/go-sqlite3):
|
|
3427
|
-
// loadExtension
|
|
3428
|
-
//
|
|
3608
|
+
// loadExtension throws; serialize / deserialize go through a temporary file;
|
|
3609
|
+
// createSession / applyChangeset emulate the session extension over the
|
|
3610
|
+
// preupdate hook.
|
|
3429
3611
|
class DatabaseSync {
|
|
3430
3612
|
constructor(path: string | Uint8Array | URL, options?: DatabaseSyncOptions);
|
|
3431
3613
|
readonly isOpen: boolean;
|
|
@@ -3440,6 +3622,7 @@ declare module 'node:sqlite' {
|
|
|
3440
3622
|
function(name: string, fn: (...args: any[]) => SQLInputValue): void;
|
|
3441
3623
|
aggregate(name: string, options: AggregateOptions): void;
|
|
3442
3624
|
aggregate<T extends SQLInputValue>(name: string, options: AggregateOptions<T>): void;
|
|
3625
|
+
createModule(name: string, options: CreateModuleOptions): void;
|
|
3443
3626
|
setAuthorizer(
|
|
3444
3627
|
callback:
|
|
3445
3628
|
| ((actionCode: number, arg1: string | null, arg2: string | null, dbName: string | null, triggerOrView: string | null) => number)
|
|
@@ -3449,8 +3632,8 @@ declare module 'node:sqlite' {
|
|
|
3449
3632
|
createTagStore(maxSize?: number): SQLTagStore;
|
|
3450
3633
|
enableLoadExtension(allow: boolean): void;
|
|
3451
3634
|
loadExtension(path: string, entryPoint?: string): void;
|
|
3452
|
-
createSession(options?:
|
|
3453
|
-
applyChangeset(changeset: Uint8Array, options?:
|
|
3635
|
+
createSession(options?: CreateSessionOptions): Session;
|
|
3636
|
+
applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
|
|
3454
3637
|
serialize(dbName?: string): Uint8Array;
|
|
3455
3638
|
deserialize(buffer: Uint8Array, options?: { dbName?: string }): void;
|
|
3456
3639
|
}
|
|
@@ -3768,6 +3951,7 @@ declare module 'assert' { import m = require('node:assert'); export = m; }
|
|
|
3768
3951
|
declare module 'assert/strict' { import m = require('node:assert/strict'); export = m; }
|
|
3769
3952
|
declare module 'crypto' { import m = require('node:crypto'); export = m; }
|
|
3770
3953
|
declare module 'zlib' { import m = require('node:zlib'); export = m; }
|
|
3954
|
+
declare module 'zlib/iter' { import m = require('node:zlib/iter'); export = m; }
|
|
3771
3955
|
declare module 'timers' { import m = require('node:timers'); export = m; }
|
|
3772
3956
|
declare module 'timers/promises' { import m = require('node:timers/promises'); export = m; }
|
|
3773
3957
|
declare module 'perf_hooks' { import m = require('node:perf_hooks'); export = m; }
|
|
@@ -3800,52 +3984,348 @@ declare module 'http2' { import m = require('node:http2'); export = m; }
|
|
|
3800
3984
|
// implement it (under Node.js the real package runs). The real 'close' event can
|
|
3801
3985
|
// be cancelled; compiled, the window is already gone, so preventDefault is absent.
|
|
3802
3986
|
declare module '@webviewjs/webview' {
|
|
3987
|
+
enum FullscreenType {
|
|
3988
|
+
Exclusive = 0,
|
|
3989
|
+
Borderless = 1
|
|
3990
|
+
}
|
|
3991
|
+
enum Theme {
|
|
3992
|
+
Light = 0,
|
|
3993
|
+
Dark = 1,
|
|
3994
|
+
System = 2
|
|
3995
|
+
}
|
|
3996
|
+
enum ProgressBarState {
|
|
3997
|
+
None = 0,
|
|
3998
|
+
Normal = 1,
|
|
3999
|
+
Indeterminate = 2,
|
|
4000
|
+
Paused = 3,
|
|
4001
|
+
Error = 4
|
|
4002
|
+
}
|
|
4003
|
+
enum ControlFlow {
|
|
4004
|
+
Poll = 0,
|
|
4005
|
+
Wait = 1,
|
|
4006
|
+
WaitUntil = 2,
|
|
4007
|
+
Exit = 3,
|
|
4008
|
+
ExitWithCode = 4
|
|
4009
|
+
}
|
|
4010
|
+
interface CustomMenuEvent {
|
|
4011
|
+
id: string;
|
|
4012
|
+
windowId: number;
|
|
4013
|
+
}
|
|
3803
4014
|
interface ApplicationEvent {
|
|
3804
4015
|
event: string;
|
|
4016
|
+
customMenuEvent?: CustomMenuEvent;
|
|
4017
|
+
x?: number;
|
|
4018
|
+
y?: number;
|
|
4019
|
+
width?: number;
|
|
4020
|
+
height?: number;
|
|
4021
|
+
}
|
|
4022
|
+
interface HeaderData {
|
|
4023
|
+
key: string;
|
|
4024
|
+
value?: string;
|
|
4025
|
+
}
|
|
4026
|
+
interface IpcMessage {
|
|
4027
|
+
body: Buffer;
|
|
4028
|
+
method: string;
|
|
4029
|
+
headers: HeaderData[];
|
|
4030
|
+
uri: string;
|
|
4031
|
+
}
|
|
4032
|
+
interface CustomProtocolResponse {
|
|
4033
|
+
statusCode?: number;
|
|
4034
|
+
headers?: HeaderData[];
|
|
4035
|
+
body: Buffer;
|
|
4036
|
+
mimeType?: string;
|
|
4037
|
+
}
|
|
4038
|
+
type BrowserWindowProtocolHandler = (
|
|
4039
|
+
request: Request
|
|
4040
|
+
) => Response | CustomProtocolResponse | Promise<Response | CustomProtocolResponse>;
|
|
4041
|
+
interface Dimensions {
|
|
4042
|
+
width: number;
|
|
4043
|
+
height: number;
|
|
4044
|
+
}
|
|
4045
|
+
interface Position {
|
|
4046
|
+
x: number;
|
|
4047
|
+
y: number;
|
|
4048
|
+
}
|
|
4049
|
+
interface MenuItemOptions {
|
|
4050
|
+
id?: string;
|
|
4051
|
+
label?: string;
|
|
4052
|
+
enabled?: boolean;
|
|
4053
|
+
accelerator?: string;
|
|
4054
|
+
submenu?: MenuOptions;
|
|
4055
|
+
role?: string;
|
|
4056
|
+
}
|
|
4057
|
+
interface MenuOptions {
|
|
4058
|
+
items: MenuItemOptions[];
|
|
4059
|
+
}
|
|
4060
|
+
interface TrayIconImage {
|
|
4061
|
+
data: Buffer;
|
|
4062
|
+
width?: number;
|
|
4063
|
+
height?: number;
|
|
4064
|
+
}
|
|
4065
|
+
interface TrayIconOptions {
|
|
4066
|
+
id?: string;
|
|
4067
|
+
icon?: TrayIconImage;
|
|
4068
|
+
tooltip?: string;
|
|
4069
|
+
title?: string;
|
|
4070
|
+
menu?: MenuOptions;
|
|
4071
|
+
iconIsTemplate?: boolean;
|
|
4072
|
+
menuOnLeftClick?: boolean;
|
|
4073
|
+
menuOnRightClick?: boolean;
|
|
4074
|
+
}
|
|
4075
|
+
interface TrayRect {
|
|
4076
|
+
x: number;
|
|
4077
|
+
y: number;
|
|
4078
|
+
width: number;
|
|
4079
|
+
height: number;
|
|
4080
|
+
}
|
|
4081
|
+
interface TrayEventPayload {
|
|
4082
|
+
event: string;
|
|
4083
|
+
id: string;
|
|
4084
|
+
x: number;
|
|
4085
|
+
y: number;
|
|
4086
|
+
rect: TrayRect;
|
|
4087
|
+
button?: string;
|
|
4088
|
+
buttonState?: string;
|
|
4089
|
+
}
|
|
4090
|
+
type TrayEventName = 'click' | 'double-click' | 'enter' | 'move' | 'leave';
|
|
4091
|
+
class TrayIcon {
|
|
4092
|
+
readonly id: string;
|
|
4093
|
+
setIcon(icon: Uint8Array | number[], width?: number | null, height?: number | null): void;
|
|
4094
|
+
removeIcon(): void;
|
|
4095
|
+
setMenu(menu?: MenuOptions | null): void;
|
|
4096
|
+
setTooltip(tooltip?: string | null): void;
|
|
4097
|
+
setTitle(title?: string | null): void;
|
|
4098
|
+
setVisible(visible: boolean): void;
|
|
4099
|
+
setIconAsTemplate(value: boolean): void;
|
|
4100
|
+
setShowMenuOnLeftClick(value: boolean): void;
|
|
4101
|
+
setShowMenuOnRightClick(value: boolean): void;
|
|
4102
|
+
showMenu(): void;
|
|
4103
|
+
rect(): TrayRect | null;
|
|
4104
|
+
dispose(): void;
|
|
4105
|
+
isDisposed(): boolean;
|
|
4106
|
+
on(event: TrayEventName, listener: (event: TrayEventPayload) => void): this;
|
|
4107
|
+
once(event: TrayEventName, listener: (event: TrayEventPayload) => void): this;
|
|
4108
|
+
off(event: TrayEventName, listener: (event: TrayEventPayload) => void): this;
|
|
4109
|
+
}
|
|
4110
|
+
type NotificationPermission = 'granted';
|
|
4111
|
+
type NotificationDirection = 'auto' | 'ltr' | 'rtl';
|
|
4112
|
+
type NotificationEventName = 'click' | 'close' | 'error' | 'show';
|
|
4113
|
+
interface NotificationAction {
|
|
4114
|
+
action: string;
|
|
4115
|
+
title: string;
|
|
4116
|
+
icon?: string;
|
|
4117
|
+
}
|
|
4118
|
+
interface NotificationOptions {
|
|
4119
|
+
body?: string;
|
|
4120
|
+
icon?: string;
|
|
4121
|
+
image?: string | Buffer;
|
|
4122
|
+
badge?: string;
|
|
4123
|
+
tag?: string;
|
|
4124
|
+
data?: unknown;
|
|
4125
|
+
dir?: NotificationDirection;
|
|
4126
|
+
lang?: string;
|
|
4127
|
+
renotify?: boolean;
|
|
4128
|
+
requireInteraction?: boolean;
|
|
4129
|
+
persistent?: boolean;
|
|
4130
|
+
actions?: NotificationAction[];
|
|
4131
|
+
silent?: boolean;
|
|
4132
|
+
timestamp?: number;
|
|
4133
|
+
vibrate?: number | number[];
|
|
4134
|
+
}
|
|
4135
|
+
interface NotificationEvent {
|
|
4136
|
+
type: NotificationEventName;
|
|
4137
|
+
target: Notification;
|
|
4138
|
+
action?: string;
|
|
4139
|
+
error?: Error;
|
|
4140
|
+
}
|
|
4141
|
+
class Notification {
|
|
4142
|
+
constructor(title: string, options?: NotificationOptions);
|
|
4143
|
+
static readonly permission: NotificationPermission;
|
|
4144
|
+
static requestPermission(): Promise<NotificationPermission>;
|
|
4145
|
+
close(): void;
|
|
4146
|
+
readonly title: string;
|
|
4147
|
+
readonly body: string;
|
|
4148
|
+
readonly icon: string;
|
|
4149
|
+
readonly image: string | Buffer;
|
|
4150
|
+
readonly badge: string;
|
|
4151
|
+
readonly tag: string;
|
|
4152
|
+
readonly data: unknown;
|
|
4153
|
+
readonly dir: NotificationDirection;
|
|
4154
|
+
readonly lang: string;
|
|
4155
|
+
readonly renotify: boolean;
|
|
4156
|
+
readonly requireInteraction: boolean;
|
|
4157
|
+
readonly persistent: boolean;
|
|
4158
|
+
readonly actions: NotificationAction[];
|
|
4159
|
+
readonly silent: boolean;
|
|
4160
|
+
readonly timestamp: number;
|
|
4161
|
+
readonly vibrate: number | number[];
|
|
4162
|
+
onclick: ((event: NotificationEvent) => void) | null;
|
|
4163
|
+
onclose: ((event: NotificationEvent) => void) | null;
|
|
4164
|
+
onerror: ((event: NotificationEvent) => void) | null;
|
|
4165
|
+
onshow: ((event: NotificationEvent) => void) | null;
|
|
4166
|
+
on(event: NotificationEventName, listener: (event: NotificationEvent) => void): this;
|
|
4167
|
+
once(event: NotificationEventName, listener: (event: NotificationEvent) => void): this;
|
|
4168
|
+
off(event: NotificationEventName, listener: (event: NotificationEvent) => void): this;
|
|
4169
|
+
}
|
|
4170
|
+
interface FileFilter {
|
|
4171
|
+
name: string;
|
|
4172
|
+
extensions: string[];
|
|
4173
|
+
}
|
|
4174
|
+
interface FileDialogOptions {
|
|
4175
|
+
multiple?: boolean;
|
|
4176
|
+
title?: string;
|
|
4177
|
+
defaultPath?: string;
|
|
4178
|
+
filters?: FileFilter[];
|
|
3805
4179
|
}
|
|
3806
4180
|
interface WebContextOptions {
|
|
3807
4181
|
// Where the webview keeps its profile. Needed under Node.js on Windows: the
|
|
3808
4182
|
// default is beside node.exe, which Program Files makes read-only
|
|
3809
4183
|
dataDirectory?: string;
|
|
4184
|
+
allowsAutomation?: boolean;
|
|
3810
4185
|
}
|
|
3811
4186
|
interface BrowserWindowOptions {
|
|
3812
4187
|
title?: string;
|
|
3813
4188
|
width?: number;
|
|
3814
4189
|
height?: number;
|
|
4190
|
+
x?: number;
|
|
4191
|
+
y?: number;
|
|
3815
4192
|
// width and height in logical pixels, which follow the display's scaling, rather
|
|
3816
4193
|
// than physical ones
|
|
3817
4194
|
logical?: boolean;
|
|
3818
4195
|
resizable?: boolean;
|
|
4196
|
+
visible?: boolean;
|
|
4197
|
+
decorations?: boolean;
|
|
4198
|
+
maximized?: boolean;
|
|
4199
|
+
maximizable?: boolean;
|
|
4200
|
+
minimizable?: boolean;
|
|
4201
|
+
focused?: boolean;
|
|
4202
|
+
alwaysOnTop?: boolean;
|
|
4203
|
+
alwaysOnBottom?: boolean;
|
|
4204
|
+
contentProtection?: boolean;
|
|
4205
|
+
fullscreen?: FullscreenType;
|
|
4206
|
+
windowsSkipTaskbar?: boolean;
|
|
4207
|
+
menu?: MenuOptions;
|
|
4208
|
+
showMenu?: boolean;
|
|
3819
4209
|
}
|
|
3820
4210
|
interface WebviewOptions {
|
|
3821
4211
|
url?: string;
|
|
3822
4212
|
html?: string;
|
|
3823
4213
|
enableDevtools?: boolean;
|
|
3824
4214
|
webContext?: WebContext | null;
|
|
4215
|
+
ipcName?: string;
|
|
4216
|
+
autoNormalizeLoadUrl?: boolean;
|
|
4217
|
+
useHttpsScheme?: boolean;
|
|
4218
|
+
}
|
|
4219
|
+
class WebContext {
|
|
4220
|
+
readonly dataDirectory: string | null;
|
|
4221
|
+
isCustomProtocolRegistered(scheme: string): boolean;
|
|
4222
|
+
setAllowsAutomation(flag: boolean): void;
|
|
4223
|
+
dispose(): void;
|
|
4224
|
+
isDisposed(): boolean;
|
|
3825
4225
|
}
|
|
3826
|
-
class WebContext {}
|
|
3827
4226
|
class Webview {
|
|
3828
4227
|
loadUrl(url: string): void;
|
|
3829
4228
|
loadHtml(html: string): void;
|
|
3830
4229
|
evaluateScript(js: string): void;
|
|
3831
4230
|
reload(): void;
|
|
4231
|
+
url(): string | null;
|
|
4232
|
+
onIpcMessage(handler?: ((message: IpcMessage) => void) | null): void;
|
|
4233
|
+
expose(name: string, target: Record<string, unknown>): void;
|
|
4234
|
+
zoom(scaleFactor: number): void;
|
|
4235
|
+
setWebviewVisibility(visible: boolean): void;
|
|
4236
|
+
focus(): void;
|
|
4237
|
+
dispose(): void;
|
|
4238
|
+
isDisposed(): boolean;
|
|
3832
4239
|
}
|
|
4240
|
+
type BrowserWindowEventName = 'close' | 'resize' | 'move' | 'focus' | 'blur';
|
|
3833
4241
|
class BrowserWindow {
|
|
3834
4242
|
createWebview(options?: WebviewOptions): Webview;
|
|
4243
|
+
registerProtocol(name: string, handler: BrowserWindowProtocolHandler): void;
|
|
4244
|
+
id(): number;
|
|
4245
|
+
readonly isChild: boolean;
|
|
4246
|
+
readonly title: string;
|
|
4247
|
+
readonly width: number;
|
|
4248
|
+
readonly height: number;
|
|
4249
|
+
readonly x: number;
|
|
4250
|
+
readonly y: number;
|
|
4251
|
+
readonly fullscreen: FullscreenType | null;
|
|
4252
|
+
hasMenu(): boolean;
|
|
3835
4253
|
setTitle(title: string): void;
|
|
4254
|
+
show(): void;
|
|
4255
|
+
hide(): void;
|
|
4256
|
+
setVisible(visible: boolean): void;
|
|
4257
|
+
isVisible(): boolean;
|
|
4258
|
+
focus(): void;
|
|
4259
|
+
isFocused(): boolean;
|
|
4260
|
+
setMaximized(value: boolean): void;
|
|
4261
|
+
isMaximized(): boolean;
|
|
4262
|
+
setMinimized(value: boolean): void;
|
|
4263
|
+
isMinimized(): boolean;
|
|
4264
|
+
setResizable(resizable: boolean): void;
|
|
4265
|
+
isResizable(): boolean;
|
|
4266
|
+
setDecorations(enabled: boolean): void;
|
|
4267
|
+
isDecorated(): boolean;
|
|
4268
|
+
setClosable(closable: boolean): void;
|
|
4269
|
+
isClosable(): boolean;
|
|
4270
|
+
setMaximizable(maximizable: boolean): void;
|
|
4271
|
+
isMaximizable(): boolean;
|
|
4272
|
+
setMinimizable(minimizable: boolean): void;
|
|
4273
|
+
isMinimizable(): boolean;
|
|
4274
|
+
setAlwaysOnTop(enabled: boolean): void;
|
|
4275
|
+
setAlwaysOnBottom(enabled: boolean): void;
|
|
4276
|
+
setContentProtection(enabled: boolean): void;
|
|
4277
|
+
setSkipTaskbar(skip: boolean): void;
|
|
4278
|
+
setEnable(enabled: boolean): void;
|
|
4279
|
+
setFullscreen(fullscreenType?: FullscreenType | null): void;
|
|
4280
|
+
setSize(width: number, height: number, logical?: boolean | null): Dimensions | null;
|
|
4281
|
+
setMinSize(width: number, height: number, logical?: boolean | null): void;
|
|
4282
|
+
setMaxSize(width: number, height: number, logical?: boolean | null): void;
|
|
4283
|
+
getInnerSize(logical?: boolean | null): Dimensions;
|
|
4284
|
+
getOuterSize(logical?: boolean | null): Dimensions;
|
|
4285
|
+
setPosition(x: number, y: number, logical?: boolean | null): void;
|
|
4286
|
+
getPosition(logical?: boolean | null): Position;
|
|
4287
|
+
center(): void;
|
|
4288
|
+
scaleFactor(): number;
|
|
4289
|
+
startDragging(): void;
|
|
4290
|
+
requestRedraw(): void;
|
|
4291
|
+
openFileDialog(options?: FileDialogOptions | null): string[];
|
|
3836
4292
|
close(): void;
|
|
3837
|
-
|
|
3838
|
-
|
|
4293
|
+
dispose(): void;
|
|
4294
|
+
isDisposed(): boolean;
|
|
4295
|
+
on(event: BrowserWindowEventName, listener: (event: ApplicationEvent) => void): this;
|
|
4296
|
+
once(event: BrowserWindowEventName, listener: (event: ApplicationEvent) => void): this;
|
|
4297
|
+
off(event: BrowserWindowEventName, listener: (event: ApplicationEvent) => void): this;
|
|
4298
|
+
}
|
|
4299
|
+
type ApplicationEventName = 'ready' | 'window-close-requested' | 'application-close-requested' | 'custom-menu-click';
|
|
4300
|
+
interface ApplicationOptions {
|
|
4301
|
+
controlFlow?: ControlFlow;
|
|
4302
|
+
waitTime?: number;
|
|
4303
|
+
exitCode?: number;
|
|
4304
|
+
}
|
|
4305
|
+
interface ApplicationRunOptions {
|
|
4306
|
+
interval?: number;
|
|
4307
|
+
ref?: boolean;
|
|
3839
4308
|
}
|
|
3840
|
-
type ApplicationEventName = 'ready' | 'window-close-requested' | 'application-close-requested';
|
|
3841
4309
|
class Application {
|
|
4310
|
+
constructor(options?: ApplicationOptions | null);
|
|
3842
4311
|
createWebContext(options?: WebContextOptions): WebContext;
|
|
3843
4312
|
createBrowserWindow(options?: BrowserWindowOptions): BrowserWindow;
|
|
4313
|
+
createChildBrowserWindow(options?: BrowserWindowOptions): BrowserWindow;
|
|
4314
|
+
createTrayIcon(options?: TrayIconOptions): TrayIcon;
|
|
4315
|
+
setMenu(menuOptions?: MenuOptions | null): void;
|
|
4316
|
+
setDockIcon(icon: Buffer): void;
|
|
4317
|
+
removeDockIcon(): void;
|
|
3844
4318
|
isReady(): boolean;
|
|
3845
|
-
run(): void;
|
|
3846
|
-
whenReady(): Promise<void>;
|
|
4319
|
+
run(options?: ApplicationRunOptions | null): void;
|
|
4320
|
+
whenReady(options?: ApplicationRunOptions | null): Promise<void>;
|
|
3847
4321
|
exit(): void;
|
|
3848
4322
|
on(event: ApplicationEventName, listener: (event: ApplicationEvent) => void): this;
|
|
3849
4323
|
once(event: ApplicationEventName, listener: (event: ApplicationEvent) => void): this;
|
|
4324
|
+
off(event: ApplicationEventName, listener: (event: ApplicationEvent) => void): this;
|
|
3850
4325
|
}
|
|
4326
|
+
function originalUriPrefix(protocol: string): string;
|
|
4327
|
+
function workAroundUriPrefix(httpOrHttps: string, protocol: string): string;
|
|
4328
|
+
function applyUriWorkAround(uri: string, httpOrHttps: string, protocol: string): string;
|
|
4329
|
+
function revertUriWorkAround(uri: string, httpOrHttps: string, protocol: string): string;
|
|
4330
|
+
function isWorkAroundUri(uri: string, httpOrHttps: string, protocol: string): boolean;
|
|
3851
4331
|
}
|