@ts-guaranteed/tsgo-win32-x64 7.0.0-alpha.2
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 +55 -0
- package/README.md +3 -0
- package/lib/lib.d.ts +20 -0
- package/lib/lib.decorators.d.ts +382 -0
- package/lib/lib.decorators.legacy.d.ts +20 -0
- package/lib/lib.dom.asynciterable.d.ts +18 -0
- package/lib/lib.dom.d.ts +45125 -0
- package/lib/lib.dom.iterable.d.ts +18 -0
- package/lib/lib.es2015.collection.d.ts +150 -0
- package/lib/lib.es2015.core.d.ts +595 -0
- package/lib/lib.es2015.d.ts +26 -0
- package/lib/lib.es2015.generator.d.ts +75 -0
- package/lib/lib.es2015.iterable.d.ts +603 -0
- package/lib/lib.es2015.promise.d.ts +79 -0
- package/lib/lib.es2015.proxy.d.ts +126 -0
- package/lib/lib.es2015.reflect.d.ts +142 -0
- package/lib/lib.es2015.symbol.d.ts +44 -0
- package/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/lib/lib.es2016.array.include.d.ts +114 -0
- package/lib/lib.es2016.d.ts +19 -0
- package/lib/lib.es2016.full.d.ts +21 -0
- package/lib/lib.es2016.intl.d.ts +29 -0
- package/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/lib/lib.es2017.d.ts +24 -0
- package/lib/lib.es2017.date.d.ts +29 -0
- package/lib/lib.es2017.full.d.ts +21 -0
- package/lib/lib.es2017.intl.d.ts +42 -0
- package/lib/lib.es2017.object.d.ts +47 -0
- package/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/lib/lib.es2017.string.d.ts +43 -0
- package/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/lib/lib.es2018.d.ts +22 -0
- package/lib/lib.es2018.full.d.ts +22 -0
- package/lib/lib.es2018.intl.d.ts +81 -0
- package/lib/lib.es2018.promise.d.ts +28 -0
- package/lib/lib.es2018.regexp.d.ts +35 -0
- package/lib/lib.es2019.array.d.ts +77 -0
- package/lib/lib.es2019.d.ts +22 -0
- package/lib/lib.es2019.full.d.ts +22 -0
- package/lib/lib.es2019.intl.d.ts +21 -0
- package/lib/lib.es2019.object.d.ts +31 -0
- package/lib/lib.es2019.string.d.ts +35 -0
- package/lib/lib.es2019.symbol.d.ts +22 -0
- package/lib/lib.es2020.bigint.d.ts +763 -0
- package/lib/lib.es2020.d.ts +25 -0
- package/lib/lib.es2020.date.d.ts +40 -0
- package/lib/lib.es2020.full.d.ts +22 -0
- package/lib/lib.es2020.intl.d.ts +472 -0
- package/lib/lib.es2020.number.d.ts +26 -0
- package/lib/lib.es2020.promise.d.ts +45 -0
- package/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/lib/lib.es2020.string.d.ts +42 -0
- package/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/lib/lib.es2021.d.ts +21 -0
- package/lib/lib.es2021.full.d.ts +22 -0
- package/lib/lib.es2021.intl.d.ts +164 -0
- package/lib/lib.es2021.promise.d.ts +46 -0
- package/lib/lib.es2021.string.d.ts +31 -0
- package/lib/lib.es2021.weakref.d.ts +76 -0
- package/lib/lib.es2022.array.d.ts +119 -0
- package/lib/lib.es2022.d.ts +23 -0
- package/lib/lib.es2022.error.d.ts +73 -0
- package/lib/lib.es2022.full.d.ts +22 -0
- package/lib/lib.es2022.intl.d.ts +143 -0
- package/lib/lib.es2022.object.d.ts +24 -0
- package/lib/lib.es2022.regexp.d.ts +37 -0
- package/lib/lib.es2022.string.d.ts +23 -0
- package/lib/lib.es2023.array.d.ts +922 -0
- package/lib/lib.es2023.collection.d.ts +19 -0
- package/lib/lib.es2023.d.ts +20 -0
- package/lib/lib.es2023.full.d.ts +22 -0
- package/lib/lib.es2023.intl.d.ts +62 -0
- package/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/lib/lib.es2024.collection.d.ts +27 -0
- package/lib/lib.es2024.d.ts +24 -0
- package/lib/lib.es2024.full.d.ts +22 -0
- package/lib/lib.es2024.object.d.ts +27 -0
- package/lib/lib.es2024.promise.d.ts +33 -0
- package/lib/lib.es2024.regexp.d.ts +23 -0
- package/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/lib/lib.es2024.string.d.ts +27 -0
- package/lib/lib.es2025.collection.d.ts +94 -0
- package/lib/lib.es2025.d.ts +23 -0
- package/lib/lib.es2025.float16.d.ts +443 -0
- package/lib/lib.es2025.full.d.ts +22 -0
- package/lib/lib.es2025.intl.d.ts +200 -0
- package/lib/lib.es2025.iterator.d.ts +146 -0
- package/lib/lib.es2025.promise.d.ts +32 -0
- package/lib/lib.es2025.regexp.d.ts +30 -0
- package/lib/lib.es5.d.ts +4599 -0
- package/lib/lib.es6.d.ts +21 -0
- package/lib/lib.esnext.array.d.ts +33 -0
- package/lib/lib.esnext.collection.d.ts +47 -0
- package/lib/lib.esnext.d.ts +27 -0
- package/lib/lib.esnext.date.d.ts +21 -0
- package/lib/lib.esnext.decorators.d.ts +26 -0
- package/lib/lib.esnext.disposable.d.ts +191 -0
- package/lib/lib.esnext.error.d.ts +22 -0
- package/lib/lib.esnext.full.d.ts +22 -0
- package/lib/lib.esnext.intl.d.ts +107 -0
- package/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/lib/lib.esnext.temporal.d.ts +485 -0
- package/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/lib/lib.scripthost.d.ts +320 -0
- package/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/lib/lib.webworker.d.ts +15606 -0
- package/lib/lib.webworker.importscripts.d.ts +21 -0
- package/lib/lib.webworker.iterable.d.ts +18 -0
- package/lib/tsgo.exe +0 -0
- package/package.json +68 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
16
|
+
|
|
17
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
18
|
+
|
|
19
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
20
|
+
|
|
21
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
22
|
+
|
|
23
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
24
|
+
|
|
25
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
26
|
+
|
|
27
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
28
|
+
|
|
29
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
30
|
+
|
|
31
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
+
|
|
33
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
34
|
+
|
|
35
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
36
|
+
|
|
37
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
38
|
+
|
|
39
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
40
|
+
|
|
41
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
42
|
+
|
|
43
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
package/lib/lib.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
MERCHANTABILITY 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
|
+
/// <reference lib="es5" />
|
|
18
|
+
/// <reference lib="dom" />
|
|
19
|
+
/// <reference lib="webworker.importscripts" />
|
|
20
|
+
/// <reference lib="scripthost" />
|
|
@@ -0,0 +1,382 @@
|
|
|
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
|
+
MERCHANTABILITY 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
|
+
* The decorator context types provided to class element decorators.
|
|
19
|
+
*/
|
|
20
|
+
type ClassMemberDecoratorContext =
|
|
21
|
+
| ClassMethodDecoratorContext
|
|
22
|
+
| ClassGetterDecoratorContext
|
|
23
|
+
| ClassSetterDecoratorContext
|
|
24
|
+
| ClassFieldDecoratorContext
|
|
25
|
+
| ClassAccessorDecoratorContext;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The decorator context types provided to any decorator.
|
|
29
|
+
*/
|
|
30
|
+
type DecoratorContext =
|
|
31
|
+
| ClassDecoratorContext
|
|
32
|
+
| ClassMemberDecoratorContext;
|
|
33
|
+
|
|
34
|
+
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
35
|
+
|
|
36
|
+
type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Context provided to a class decorator.
|
|
40
|
+
* @template Class The type of the decorated class associated with this context.
|
|
41
|
+
*/
|
|
42
|
+
interface ClassDecoratorContext<
|
|
43
|
+
Class extends abstract new (...args: any) => any = abstract new (...args: any) => any,
|
|
44
|
+
> {
|
|
45
|
+
/** The kind of element that was decorated. */
|
|
46
|
+
readonly kind: "class";
|
|
47
|
+
|
|
48
|
+
/** The name of the decorated class. */
|
|
49
|
+
readonly name: string | undefined;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Adds a callback to be invoked after the class definition has been finalized.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* function customElement(name: string): ClassDecoratorFunction {
|
|
57
|
+
* return (target, context) => {
|
|
58
|
+
* context.addInitializer(function () {
|
|
59
|
+
* customElements.define(name, this);
|
|
60
|
+
* });
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* @customElement("my-element")
|
|
65
|
+
* class MyElement {}
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
addInitializer(initializer: (this: Class) => void): void;
|
|
69
|
+
|
|
70
|
+
readonly metadata: DecoratorMetadata;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Context provided to a class method decorator.
|
|
75
|
+
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
76
|
+
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
77
|
+
* @template Value The type of the decorated class method.
|
|
78
|
+
*/
|
|
79
|
+
interface ClassMethodDecoratorContext<
|
|
80
|
+
This = unknown,
|
|
81
|
+
Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any,
|
|
82
|
+
> {
|
|
83
|
+
/** The kind of class element that was decorated. */
|
|
84
|
+
readonly kind: "method";
|
|
85
|
+
|
|
86
|
+
/** The name of the decorated class element. */
|
|
87
|
+
readonly name: string | symbol;
|
|
88
|
+
|
|
89
|
+
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
90
|
+
readonly static: boolean;
|
|
91
|
+
|
|
92
|
+
/** A value indicating whether the class element has a private name. */
|
|
93
|
+
readonly private: boolean;
|
|
94
|
+
|
|
95
|
+
/** An object that can be used to access the current value of the class element at runtime. */
|
|
96
|
+
readonly access: {
|
|
97
|
+
/**
|
|
98
|
+
* Determines whether an object has a property with the same name as the decorated element.
|
|
99
|
+
*/
|
|
100
|
+
has(object: This): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Gets the current value of the method from the provided object.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* let fn = context.access.get(instance);
|
|
106
|
+
*/
|
|
107
|
+
get(object: This): Value;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
112
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
113
|
+
* initializers are run (when decorating a non-`static` element).
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const bound: ClassMethodDecoratorFunction = (value, context) {
|
|
118
|
+
* if (context.private) throw new TypeError("Not supported on private methods.");
|
|
119
|
+
* context.addInitializer(function () {
|
|
120
|
+
* this[context.name] = this[context.name].bind(this);
|
|
121
|
+
* });
|
|
122
|
+
* }
|
|
123
|
+
*
|
|
124
|
+
* class C {
|
|
125
|
+
* message = "Hello";
|
|
126
|
+
*
|
|
127
|
+
* @bound
|
|
128
|
+
* m() {
|
|
129
|
+
* console.log(this.message);
|
|
130
|
+
* }
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
addInitializer(initializer: (this: This) => void): void;
|
|
135
|
+
|
|
136
|
+
readonly metadata: DecoratorMetadata;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Context provided to a class getter decorator.
|
|
141
|
+
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
142
|
+
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
143
|
+
* @template Value The property type of the decorated class getter.
|
|
144
|
+
*/
|
|
145
|
+
interface ClassGetterDecoratorContext<
|
|
146
|
+
This = unknown,
|
|
147
|
+
Value = unknown,
|
|
148
|
+
> {
|
|
149
|
+
/** The kind of class element that was decorated. */
|
|
150
|
+
readonly kind: "getter";
|
|
151
|
+
|
|
152
|
+
/** The name of the decorated class element. */
|
|
153
|
+
readonly name: string | symbol;
|
|
154
|
+
|
|
155
|
+
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
156
|
+
readonly static: boolean;
|
|
157
|
+
|
|
158
|
+
/** A value indicating whether the class element has a private name. */
|
|
159
|
+
readonly private: boolean;
|
|
160
|
+
|
|
161
|
+
/** An object that can be used to access the current value of the class element at runtime. */
|
|
162
|
+
readonly access: {
|
|
163
|
+
/**
|
|
164
|
+
* Determines whether an object has a property with the same name as the decorated element.
|
|
165
|
+
*/
|
|
166
|
+
has(object: This): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Invokes the getter on the provided object.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* let value = context.access.get(instance);
|
|
172
|
+
*/
|
|
173
|
+
get(object: This): Value;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
178
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
179
|
+
* initializers are run (when decorating a non-`static` element).
|
|
180
|
+
*/
|
|
181
|
+
addInitializer(initializer: (this: This) => void): void;
|
|
182
|
+
|
|
183
|
+
readonly metadata: DecoratorMetadata;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Context provided to a class setter decorator.
|
|
188
|
+
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
189
|
+
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
190
|
+
* @template Value The type of the decorated class setter.
|
|
191
|
+
*/
|
|
192
|
+
interface ClassSetterDecoratorContext<
|
|
193
|
+
This = unknown,
|
|
194
|
+
Value = unknown,
|
|
195
|
+
> {
|
|
196
|
+
/** The kind of class element that was decorated. */
|
|
197
|
+
readonly kind: "setter";
|
|
198
|
+
|
|
199
|
+
/** The name of the decorated class element. */
|
|
200
|
+
readonly name: string | symbol;
|
|
201
|
+
|
|
202
|
+
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
203
|
+
readonly static: boolean;
|
|
204
|
+
|
|
205
|
+
/** A value indicating whether the class element has a private name. */
|
|
206
|
+
readonly private: boolean;
|
|
207
|
+
|
|
208
|
+
/** An object that can be used to access the current value of the class element at runtime. */
|
|
209
|
+
readonly access: {
|
|
210
|
+
/**
|
|
211
|
+
* Determines whether an object has a property with the same name as the decorated element.
|
|
212
|
+
*/
|
|
213
|
+
has(object: This): boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Invokes the setter on the provided object.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* context.access.set(instance, value);
|
|
219
|
+
*/
|
|
220
|
+
set(object: This, value: Value): void;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
225
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
226
|
+
* initializers are run (when decorating a non-`static` element).
|
|
227
|
+
*/
|
|
228
|
+
addInitializer(initializer: (this: This) => void): void;
|
|
229
|
+
|
|
230
|
+
readonly metadata: DecoratorMetadata;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Context provided to a class `accessor` field decorator.
|
|
235
|
+
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
236
|
+
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
237
|
+
* @template Value The type of decorated class field.
|
|
238
|
+
*/
|
|
239
|
+
interface ClassAccessorDecoratorContext<
|
|
240
|
+
This = unknown,
|
|
241
|
+
Value = unknown,
|
|
242
|
+
> {
|
|
243
|
+
/** The kind of class element that was decorated. */
|
|
244
|
+
readonly kind: "accessor";
|
|
245
|
+
|
|
246
|
+
/** The name of the decorated class element. */
|
|
247
|
+
readonly name: string | symbol;
|
|
248
|
+
|
|
249
|
+
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
250
|
+
readonly static: boolean;
|
|
251
|
+
|
|
252
|
+
/** A value indicating whether the class element has a private name. */
|
|
253
|
+
readonly private: boolean;
|
|
254
|
+
|
|
255
|
+
/** An object that can be used to access the current value of the class element at runtime. */
|
|
256
|
+
readonly access: {
|
|
257
|
+
/**
|
|
258
|
+
* Determines whether an object has a property with the same name as the decorated element.
|
|
259
|
+
*/
|
|
260
|
+
has(object: This): boolean;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Invokes the getter on the provided object.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* let value = context.access.get(instance);
|
|
267
|
+
*/
|
|
268
|
+
get(object: This): Value;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Invokes the setter on the provided object.
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* context.access.set(instance, value);
|
|
275
|
+
*/
|
|
276
|
+
set(object: This, value: Value): void;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Adds a callback to be invoked immediately after the auto `accessor` being
|
|
281
|
+
* decorated is initialized (regardless if the `accessor` is `static` or not).
|
|
282
|
+
*/
|
|
283
|
+
addInitializer(initializer: (this: This) => void): void;
|
|
284
|
+
|
|
285
|
+
readonly metadata: DecoratorMetadata;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Describes the target provided to class `accessor` field decorators.
|
|
290
|
+
* @template This The `this` type to which the target applies.
|
|
291
|
+
* @template Value The property type for the class `accessor` field.
|
|
292
|
+
*/
|
|
293
|
+
interface ClassAccessorDecoratorTarget<This, Value> {
|
|
294
|
+
/**
|
|
295
|
+
* Invokes the getter that was defined prior to decorator application.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* let value = target.get.call(instance);
|
|
299
|
+
*/
|
|
300
|
+
get(this: This): Value;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Invokes the setter that was defined prior to decorator application.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* target.set.call(instance, value);
|
|
307
|
+
*/
|
|
308
|
+
set(this: This, value: Value): void;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Describes the allowed return value from a class `accessor` field decorator.
|
|
313
|
+
* @template This The `this` type to which the target applies.
|
|
314
|
+
* @template Value The property type for the class `accessor` field.
|
|
315
|
+
*/
|
|
316
|
+
interface ClassAccessorDecoratorResult<This, Value> {
|
|
317
|
+
/**
|
|
318
|
+
* An optional replacement getter function. If not provided, the existing getter function is used instead.
|
|
319
|
+
*/
|
|
320
|
+
get?(this: This): Value;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* An optional replacement setter function. If not provided, the existing setter function is used instead.
|
|
324
|
+
*/
|
|
325
|
+
set?(this: This, value: Value): void;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* An optional initializer mutator that is invoked when the underlying field initializer is evaluated.
|
|
329
|
+
* @param value The incoming initializer value.
|
|
330
|
+
* @returns The replacement initializer value.
|
|
331
|
+
*/
|
|
332
|
+
init?(this: This, value: Value): Value;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Context provided to a class field decorator.
|
|
337
|
+
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
338
|
+
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
339
|
+
* @template Value The type of the decorated class field.
|
|
340
|
+
*/
|
|
341
|
+
interface ClassFieldDecoratorContext<
|
|
342
|
+
This = unknown,
|
|
343
|
+
Value = unknown,
|
|
344
|
+
> {
|
|
345
|
+
/** The kind of class element that was decorated. */
|
|
346
|
+
readonly kind: "field";
|
|
347
|
+
|
|
348
|
+
/** The name of the decorated class element. */
|
|
349
|
+
readonly name: string | symbol;
|
|
350
|
+
|
|
351
|
+
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
352
|
+
readonly static: boolean;
|
|
353
|
+
|
|
354
|
+
/** A value indicating whether the class element has a private name. */
|
|
355
|
+
readonly private: boolean;
|
|
356
|
+
|
|
357
|
+
/** An object that can be used to access the current value of the class element at runtime. */
|
|
358
|
+
readonly access: {
|
|
359
|
+
/**
|
|
360
|
+
* Determines whether an object has a property with the same name as the decorated element.
|
|
361
|
+
*/
|
|
362
|
+
has(object: This): boolean;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Gets the value of the field on the provided object.
|
|
366
|
+
*/
|
|
367
|
+
get(object: This): Value;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Sets the value of the field on the provided object.
|
|
371
|
+
*/
|
|
372
|
+
set(object: This, value: Value): void;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Adds a callback to be invoked immediately after the field being decorated
|
|
377
|
+
* is initialized (regardless if the field is `static` or not).
|
|
378
|
+
*/
|
|
379
|
+
addInitializer(initializer: (this: This) => void): void;
|
|
380
|
+
|
|
381
|
+
readonly metadata: DecoratorMetadata;
|
|
382
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
MERCHANTABILITY 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
|
+
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
|
18
|
+
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
|
19
|
+
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
20
|
+
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
MERCHANTABILITY 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
|
+
// This file's contents are now included in the main types file.
|
|
18
|
+
// The file has been left for backward compatibility.
|