@rindo/core 2.16.0-beta.0
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/LICENSE.md +27 -0
- package/bin/rindo +57 -0
- package/cli/index.cjs +1784 -0
- package/cli/index.d.ts +15 -0
- package/cli/index.js +1758 -0
- package/cli/package.json +14 -0
- package/compiler/lib.d.ts +24 -0
- package/compiler/lib.dom.d.ts +17791 -0
- package/compiler/lib.dom.iterable.d.ts +323 -0
- package/compiler/lib.es2015.collection.d.ts +89 -0
- package/compiler/lib.es2015.core.d.ts +559 -0
- package/compiler/lib.es2015.d.ts +30 -0
- package/compiler/lib.es2015.generator.d.ts +79 -0
- package/compiler/lib.es2015.iterable.d.ts +497 -0
- package/compiler/lib.es2015.promise.d.ts +78 -0
- package/compiler/lib.es2015.proxy.d.ts +41 -0
- package/compiler/lib.es2015.reflect.d.ts +123 -0
- package/compiler/lib.es2015.symbol.d.ts +48 -0
- package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/compiler/lib.es2016.array.include.d.ts +118 -0
- package/compiler/lib.es2016.d.ts +22 -0
- package/compiler/lib.es2016.full.d.ts +25 -0
- package/compiler/lib.es2017.d.ts +26 -0
- package/compiler/lib.es2017.full.d.ts +25 -0
- package/compiler/lib.es2017.intl.d.ts +32 -0
- package/compiler/lib.es2017.object.d.ts +51 -0
- package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
- package/compiler/lib.es2017.string.d.ts +47 -0
- package/compiler/lib.es2017.typedarrays.d.ts +55 -0
- package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
- package/compiler/lib.es2018.asynciterable.d.ts +45 -0
- package/compiler/lib.es2018.d.ts +26 -0
- package/compiler/lib.es2018.full.d.ts +25 -0
- package/compiler/lib.es2018.intl.d.ts +73 -0
- package/compiler/lib.es2018.promise.d.ts +32 -0
- package/compiler/lib.es2018.regexp.d.ts +39 -0
- package/compiler/lib.es2019.array.d.ts +85 -0
- package/compiler/lib.es2019.d.ts +25 -0
- package/compiler/lib.es2019.full.d.ts +25 -0
- package/compiler/lib.es2019.object.d.ts +35 -0
- package/compiler/lib.es2019.string.d.ts +39 -0
- package/compiler/lib.es2019.symbol.d.ts +26 -0
- package/compiler/lib.es2020.bigint.d.ts +728 -0
- package/compiler/lib.es2020.d.ts +27 -0
- package/compiler/lib.es2020.full.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +368 -0
- package/compiler/lib.es2020.promise.d.ts +49 -0
- package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
- package/compiler/lib.es2020.string.d.ts +30 -0
- package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/compiler/lib.es2021.d.ts +25 -0
- package/compiler/lib.es2021.full.d.ts +25 -0
- package/compiler/lib.es2021.intl.d.ts +44 -0
- package/compiler/lib.es2021.promise.d.ts +50 -0
- package/compiler/lib.es2021.string.d.ts +35 -0
- package/compiler/lib.es2021.weakref.d.ts +75 -0
- package/compiler/lib.es5.d.ts +4495 -0
- package/compiler/lib.es6.d.ts +25 -0
- package/compiler/lib.esnext.d.ts +22 -0
- package/compiler/lib.esnext.full.d.ts +25 -0
- package/compiler/lib.esnext.intl.d.ts +23 -0
- package/compiler/lib.esnext.promise.d.ts +43 -0
- package/compiler/lib.esnext.string.d.ts +35 -0
- package/compiler/lib.esnext.weakref.d.ts +75 -0
- package/compiler/lib.scripthost.d.ts +327 -0
- package/compiler/lib.webworker.d.ts +5733 -0
- package/compiler/lib.webworker.importscripts.d.ts +26 -0
- package/compiler/lib.webworker.iterable.d.ts +160 -0
- package/compiler/package.json +8 -0
- package/compiler/rindo.d.ts +95 -0
- package/compiler/rindo.js +67222 -0
- package/compiler/rindo.min.js +4 -0
- package/dependencies.json +109 -0
- package/dev-server/client/app-error.d.ts +18 -0
- package/dev-server/client/events.d.ts +6 -0
- package/dev-server/client/hmr-components.d.ts +1 -0
- package/dev-server/client/hmr-external-styles.d.ts +1 -0
- package/dev-server/client/hmr-images.d.ts +1 -0
- package/dev-server/client/hmr-inline-styles.d.ts +1 -0
- package/dev-server/client/hmr-util.d.ts +9 -0
- package/dev-server/client/hmr-window.d.ts +10 -0
- package/dev-server/client/index.d.ts +6 -0
- package/dev-server/client/index.js +808 -0
- package/dev-server/client/logger.d.ts +5 -0
- package/dev-server/client/package.json +8 -0
- package/dev-server/client/progress.d.ts +3 -0
- package/dev-server/client/status.d.ts +4 -0
- package/dev-server/connector.html +6 -0
- package/dev-server/index.d.ts +3 -0
- package/dev-server/index.js +264 -0
- package/dev-server/open-in-editor-api.js +1 -0
- package/dev-server/package.json +8 -0
- package/dev-server/server-process.js +1763 -0
- package/dev-server/server-worker-thread.js +39 -0
- package/dev-server/static/favicon.ico +0 -0
- package/dev-server/templates/directory-index.html +132 -0
- package/dev-server/templates/initial-load.html +160 -0
- package/dev-server/visualstudio.vbs +82 -0
- package/dev-server/ws.js +1 -0
- package/dev-server/xdg-open +1066 -0
- package/internal/app-data/index.cjs +92 -0
- package/internal/app-data/index.d.ts +4 -0
- package/internal/app-data/index.js +88 -0
- package/internal/app-data/package.json +15 -0
- package/internal/client/css-shim.js +4 -0
- package/internal/client/dom.js +73 -0
- package/internal/client/index.js +3059 -0
- package/internal/client/package.json +8 -0
- package/internal/client/patch-browser.js +124 -0
- package/internal/client/patch-esm.js +23 -0
- package/internal/client/polyfills/core-js.js +11 -0
- package/internal/client/polyfills/css-shim.js +1 -0
- package/internal/client/polyfills/dom.js +79 -0
- package/internal/client/polyfills/es5-html-element.js +1 -0
- package/internal/client/polyfills/index.js +34 -0
- package/internal/client/polyfills/system.js +6 -0
- package/internal/client/shadow-css.js +387 -0
- package/internal/hydrate/index.js +1132 -0
- package/internal/hydrate/package.json +7 -0
- package/internal/hydrate/runner.d.ts +217 -0
- package/internal/hydrate/runner.js +777 -0
- package/internal/hydrate/shadow-css.js +143 -0
- package/internal/index.d.ts +4 -0
- package/internal/index.js +2 -0
- package/internal/package.json +9 -0
- package/internal/rindo-core/index.cjs +1 -0
- package/internal/rindo-core/index.d.ts +52 -0
- package/internal/rindo-core/index.js +16 -0
- package/internal/rindo-ext-modules.d.ts +41 -0
- package/internal/rindo-private.d.ts +2289 -0
- package/internal/rindo-public-compiler.d.ts +2273 -0
- package/internal/rindo-public-docs.d.ts +116 -0
- package/internal/rindo-public-runtime.d.ts +1565 -0
- package/internal/testing/index.js +1093 -0
- package/internal/testing/package.json +7 -0
- package/internal/testing/shadow-css.js +143 -0
- package/mock-doc/index.cjs +4658 -0
- package/mock-doc/index.d.ts +928 -0
- package/mock-doc/index.js +4622 -0
- package/mock-doc/package.json +15 -0
- package/package.json +151 -0
- package/readme.md +74 -0
- package/screenshot/compare/assets/favicon.ico +0 -0
- package/screenshot/compare/assets/logo.png +0 -0
- package/screenshot/compare/build/app.css +1 -0
- package/screenshot/compare/build/app.esm.js +1 -0
- package/screenshot/compare/build/app.js +33 -0
- package/screenshot/compare/build/index.esm.js +0 -0
- package/screenshot/compare/build/p-081b0641.js +1 -0
- package/screenshot/compare/build/p-227a1e18.entry.js +1 -0
- package/screenshot/compare/build/p-2c298727.entry.js +1 -0
- package/screenshot/compare/build/p-5479268c.entry.js +1 -0
- package/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
- package/screenshot/compare/build/p-6ba08604.entry.js +1 -0
- package/screenshot/compare/build/p-6bc63295.entry.js +1 -0
- package/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
- package/screenshot/compare/build/p-7b4e3ba7.js +1 -0
- package/screenshot/compare/build/p-988eb362.css +1 -0
- package/screenshot/compare/build/p-9b6a9315.js +1 -0
- package/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
- package/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
- package/screenshot/compare/build/p-e2efe0df.js +1 -0
- package/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
- package/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
- package/screenshot/compare/build/p-f0b99977.entry.js +1 -0
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
- package/screenshot/compare/build/p-fbbae598.js +1 -0
- package/screenshot/compare/host.config.json +15 -0
- package/screenshot/compare/index.html +1 -0
- package/screenshot/compare/manifest.json +13 -0
- package/screenshot/connector-base.d.ts +42 -0
- package/screenshot/connector-local.d.ts +7 -0
- package/screenshot/connector.js +2 -0
- package/screenshot/index.d.ts +3 -0
- package/screenshot/index.js +659 -0
- package/screenshot/local-connector.js +2 -0
- package/screenshot/package.json +15 -0
- package/screenshot/pixel-match.d.ts +1 -0
- package/screenshot/pixel-match.js +2673 -0
- package/screenshot/screenshot-compare.d.ts +3 -0
- package/screenshot/screenshot-fs.d.ts +15 -0
- package/sys/node/autoprefixer.js +8 -0
- package/sys/node/glob.js +1 -0
- package/sys/node/graceful-fs.js +1 -0
- package/sys/node/index.d.ts +18 -0
- package/sys/node/index.js +6124 -0
- package/sys/node/node-fetch.js +1 -0
- package/sys/node/package.json +8 -0
- package/sys/node/prompts.js +1 -0
- package/sys/node/worker.js +52 -0
- package/testing/index.d.ts +12 -0
- package/testing/index.js +4232 -0
- package/testing/jest/jest-config.d.ts +16 -0
- package/testing/jest/jest-environment.d.ts +15 -0
- package/testing/jest/jest-preprocessor.d.ts +59 -0
- package/testing/jest/jest-runner.d.ts +9 -0
- package/testing/jest/jest-screenshot.d.ts +2 -0
- package/testing/jest/jest-serializer.d.ts +5 -0
- package/testing/jest/jest-setup-test-framework.d.ts +1 -0
- package/testing/jest-environment.js +3 -0
- package/testing/jest-preprocessor.js +3 -0
- package/testing/jest-preset.js +37 -0
- package/testing/jest-runner.js +3 -0
- package/testing/jest-setuptestframework.js +3 -0
- package/testing/matchers/attributes.d.ts +14 -0
- package/testing/matchers/class-list.d.ts +12 -0
- package/testing/matchers/events.d.ts +21 -0
- package/testing/matchers/html.d.ts +12 -0
- package/testing/matchers/index.d.ts +23 -0
- package/testing/matchers/screenshot.d.ts +5 -0
- package/testing/matchers/text.d.ts +4 -0
- package/testing/mock-fetch.d.ts +11 -0
- package/testing/mocks.d.ts +10 -0
- package/testing/package.json +8 -0
- package/testing/puppeteer/index.d.ts +2 -0
- package/testing/puppeteer/puppeteer-browser.d.ts +6 -0
- package/testing/puppeteer/puppeteer-declarations.d.ts +429 -0
- package/testing/puppeteer/puppeteer-element.d.ts +67 -0
- package/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
- package/testing/puppeteer/puppeteer-events.d.ts +21 -0
- package/testing/puppeteer/puppeteer-page.d.ts +2 -0
- package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
- package/testing/reset-build-conditionals.d.ts +2 -0
- package/testing/spec-page.d.ts +2 -0
- package/testing/test-transpile.d.ts +2 -0
- package/testing/testing-logger.d.ts +25 -0
- package/testing/testing-sys.d.ts +6 -0
- package/testing/testing-utils.d.ts +6 -0
- package/testing/testing.d.ts +2 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <reference lib="es2021" />
|
|
22
|
+
/// <reference lib="dom" />
|
|
23
|
+
/// <reference lib="webworker.importscripts" />
|
|
24
|
+
/// <reference lib="scripthost" />
|
|
25
|
+
/// <reference lib="dom.iterable" />
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
declare namespace Intl {
|
|
22
|
+
|
|
23
|
+
interface DateTimeFormatOptions {
|
|
24
|
+
formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
|
|
25
|
+
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
26
|
+
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
27
|
+
dayPeriod?: "narrow" | "short" | "long" | undefined;
|
|
28
|
+
fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface ResolvedDateTimeFormatOptions {
|
|
32
|
+
formatMatcher?: "basic" | "best fit" | "best fit";
|
|
33
|
+
dateStyle?: "full" | "long" | "medium" | "short";
|
|
34
|
+
timeStyle?: "full" | "long" | "medium" | "short";
|
|
35
|
+
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
|
36
|
+
dayPeriod?: "narrow" | "short" | "long";
|
|
37
|
+
fractionalSecondDigits?: 0 | 1 | 2 | 3;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface NumberFormat {
|
|
41
|
+
formatRange(startDate: number | bigint, endDate: number | bigint): string;
|
|
42
|
+
formatRangeToParts(startDate: number | bigint, endDate: number | bigint): NumberFormatPart[];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface AggregateError extends Error {
|
|
22
|
+
errors: any[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AggregateErrorConstructor {
|
|
26
|
+
new(errors: Iterable<any>, message?: string): AggregateError;
|
|
27
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
28
|
+
readonly prototype: AggregateError;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare var AggregateError: AggregateErrorConstructor;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Represents the completion of an asynchronous operation
|
|
35
|
+
*/
|
|
36
|
+
interface PromiseConstructor {
|
|
37
|
+
/**
|
|
38
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
39
|
+
* @param values An array or iterable of Promises.
|
|
40
|
+
* @returns A new Promise.
|
|
41
|
+
*/
|
|
42
|
+
any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
46
|
+
* @param values An array or iterable of Promises.
|
|
47
|
+
* @returns A new Promise.
|
|
48
|
+
*/
|
|
49
|
+
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>
|
|
50
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface String {
|
|
22
|
+
/**
|
|
23
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
24
|
+
* @param searchValue A string to search for.
|
|
25
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
26
|
+
*/
|
|
27
|
+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
31
|
+
* @param searchValue A string to search for.
|
|
32
|
+
* @param replacer A function that returns the replacement text.
|
|
33
|
+
*/
|
|
34
|
+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface WeakRef<T extends object> {
|
|
22
|
+
readonly [Symbol.toStringTag]: "WeakRef";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the WeakRef instance's target object, or undefined if the target object has been
|
|
26
|
+
* reclaimed.
|
|
27
|
+
*/
|
|
28
|
+
deref(): T | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface WeakRefConstructor {
|
|
32
|
+
readonly prototype: WeakRef<any>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Creates a WeakRef instance for the given target object.
|
|
36
|
+
* @param target The target object for the WeakRef instance.
|
|
37
|
+
*/
|
|
38
|
+
new<T extends object>(target: T): WeakRef<T>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare var WeakRef: WeakRefConstructor;
|
|
42
|
+
|
|
43
|
+
interface FinalizationRegistry<T> {
|
|
44
|
+
readonly [Symbol.toStringTag]: "FinalizationRegistry";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Registers an object with the registry.
|
|
48
|
+
* @param target The target object to register.
|
|
49
|
+
* @param heldValue The value to pass to the finalizer for this object. This cannot be the
|
|
50
|
+
* target object.
|
|
51
|
+
* @param unregisterToken The token to pass to the unregister method to unregister the target
|
|
52
|
+
* object. If provided (and not undefined), this must be an object. If not provided, the target
|
|
53
|
+
* cannot be unregistered.
|
|
54
|
+
*/
|
|
55
|
+
register(target: object, heldValue: T, unregisterToken?: object): void;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Unregisters an object from the registry.
|
|
59
|
+
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
|
60
|
+
* register to register the target object.
|
|
61
|
+
*/
|
|
62
|
+
unregister(unregisterToken: object): void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface FinalizationRegistryConstructor {
|
|
66
|
+
readonly prototype: FinalizationRegistry<any>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Creates a finalization registry with an associated cleanup callback
|
|
70
|
+
* @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
|
|
71
|
+
*/
|
|
72
|
+
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|