@bedrock-apis/env-types 1.0.0-beta.6 → 1.0.0-rc.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.
Files changed (2) hide show
  1. package/lib.d.ts +175 -0
  2. package/package.json +2 -1
package/lib.d.ts CHANGED
@@ -3018,6 +3018,181 @@ interface FinalizationRegistryConstructor {
3018
3018
  }
3019
3019
  declare var FinalizationRegistry: FinalizationRegistryConstructor;
3020
3020
 
3021
+ interface Array<T> {
3022
+ /**
3023
+ * Returns the item located at the specified index.
3024
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3025
+ */
3026
+ at(index: number): T | undefined;
3027
+ }
3028
+ interface ReadonlyArray<T> {
3029
+ /**
3030
+ * Returns the item located at the specified index.
3031
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3032
+ */
3033
+ at(index: number): T | undefined;
3034
+ }
3035
+ interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
3036
+ /**
3037
+ * Returns the item located at the specified index.
3038
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3039
+ */
3040
+ at(index: number): number | undefined;
3041
+ }
3042
+ interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
3043
+ /**
3044
+ * Returns the item located at the specified index.
3045
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3046
+ */
3047
+ at(index: number): number | undefined;
3048
+ }
3049
+ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
3050
+ /**
3051
+ * Returns the item located at the specified index.
3052
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3053
+ */
3054
+ at(index: number): number | undefined;
3055
+ }
3056
+ interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
3057
+ /**
3058
+ * Returns the item located at the specified index.
3059
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3060
+ */
3061
+ at(index: number): number | undefined;
3062
+ }
3063
+ interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
3064
+ /**
3065
+ * Returns the item located at the specified index.
3066
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3067
+ */
3068
+ at(index: number): number | undefined;
3069
+ }
3070
+ interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
3071
+ /**
3072
+ * Returns the item located at the specified index.
3073
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3074
+ */
3075
+ at(index: number): number | undefined;
3076
+ }
3077
+ interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
3078
+ /**
3079
+ * Returns the item located at the specified index.
3080
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3081
+ */
3082
+ at(index: number): number | undefined;
3083
+ }
3084
+ interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
3085
+ /**
3086
+ * Returns the item located at the specified index.
3087
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3088
+ */
3089
+ at(index: number): number | undefined;
3090
+ }
3091
+ interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
3092
+ /**
3093
+ * Returns the item located at the specified index.
3094
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3095
+ */
3096
+ at(index: number): number | undefined;
3097
+ }
3098
+ interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> {
3099
+ /**
3100
+ * Returns the item located at the specified index.
3101
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3102
+ */
3103
+ at(index: number): bigint | undefined;
3104
+ }
3105
+ interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> {
3106
+ /**
3107
+ * Returns the item located at the specified index.
3108
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3109
+ */
3110
+ at(index: number): bigint | undefined;
3111
+ }
3112
+
3113
+ interface ErrorOptions {
3114
+ cause?: unknown;
3115
+ }
3116
+ interface Error {
3117
+ cause?: unknown;
3118
+ }
3119
+ interface ErrorConstructor {
3120
+ new (message?: string, options?: ErrorOptions): Error;
3121
+ (message?: string, options?: ErrorOptions): Error;
3122
+ }
3123
+ interface EvalErrorConstructor {
3124
+ new (message?: string, options?: ErrorOptions): EvalError;
3125
+ (message?: string, options?: ErrorOptions): EvalError;
3126
+ }
3127
+ interface RangeErrorConstructor {
3128
+ new (message?: string, options?: ErrorOptions): RangeError;
3129
+ (message?: string, options?: ErrorOptions): RangeError;
3130
+ }
3131
+ interface ReferenceErrorConstructor {
3132
+ new (message?: string, options?: ErrorOptions): ReferenceError;
3133
+ (message?: string, options?: ErrorOptions): ReferenceError;
3134
+ }
3135
+ interface SyntaxErrorConstructor {
3136
+ new (message?: string, options?: ErrorOptions): SyntaxError;
3137
+ (message?: string, options?: ErrorOptions): SyntaxError;
3138
+ }
3139
+ interface TypeErrorConstructor {
3140
+ new (message?: string, options?: ErrorOptions): TypeError;
3141
+ (message?: string, options?: ErrorOptions): TypeError;
3142
+ }
3143
+ interface URIErrorConstructor {
3144
+ new (message?: string, options?: ErrorOptions): URIError;
3145
+ (message?: string, options?: ErrorOptions): URIError;
3146
+ }
3147
+ interface AggregateErrorConstructor {
3148
+ new (
3149
+ errors: Iterable<any>,
3150
+ message?: string,
3151
+ options?: ErrorOptions,
3152
+ ): AggregateError;
3153
+ (
3154
+ errors: Iterable<any>,
3155
+ message?: string,
3156
+ options?: ErrorOptions,
3157
+ ): AggregateError;
3158
+ }
3159
+
3160
+ interface ObjectConstructor {
3161
+ /**
3162
+ * Determines whether an object has a property with the specified name.
3163
+ * @param o An object.
3164
+ * @param v A property name.
3165
+ */
3166
+ hasOwn(o: object, v: PropertyKey): boolean;
3167
+ }
3168
+
3169
+ interface RegExpMatchArray {
3170
+ indices?: RegExpIndicesArray;
3171
+ }
3172
+ interface RegExpExecArray {
3173
+ indices?: RegExpIndicesArray;
3174
+ }
3175
+ interface RegExpIndicesArray extends Array<[number, number]> {
3176
+ groups?: {
3177
+ [key: string]: [number, number];
3178
+ };
3179
+ }
3180
+ interface RegExp {
3181
+ /**
3182
+ * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression.
3183
+ * Default is false. Read-only.
3184
+ */
3185
+ readonly hasIndices: boolean;
3186
+ }
3187
+
3188
+ interface String {
3189
+ /**
3190
+ * Returns a new String consisting of the single UTF-16 code unit located at the specified index.
3191
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3192
+ */
3193
+ at(index: number): string | undefined;
3194
+ }
3195
+
3021
3196
  interface Array<T> {
3022
3197
  /**
3023
3198
  * Returns the value of the last element in the array where predicate is true, and undefined
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@bedrock-apis/env-types",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "A collection of environment-specific TypeScript type definitions for engines with non-standard versioning and selective feature support across versions.",
5
5
  "main": "",
6
6
  "types": "lib.d.ts",
7
+ "type": "module",
7
8
  "keywords": [
8
9
  "typescript",
9
10
  "api-types",