Skip to content

Dogfood the 'noPropertyAccessFromIndexSignature' flag #41784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
103 changes: 83 additions & 20 deletions lib/cs/diagnosticMessages.generated.json

Large diffs are not rendered by default.

103 changes: 83 additions & 20 deletions lib/de/diagnosticMessages.generated.json

Large diffs are not rendered by default.

105 changes: 84 additions & 21 deletions lib/es/diagnosticMessages.generated.json

Large diffs are not rendered by default.

117 changes: 90 additions & 27 deletions lib/fr/diagnosticMessages.generated.json

Large diffs are not rendered by default.

113 changes: 88 additions & 25 deletions lib/it/diagnosticMessages.generated.json

Large diffs are not rendered by default.

113 changes: 88 additions & 25 deletions lib/ja/diagnosticMessages.generated.json

Large diffs are not rendered by default.

105 changes: 84 additions & 21 deletions lib/ko/diagnosticMessages.generated.json

Large diffs are not rendered by default.

185 changes: 117 additions & 68 deletions lib/lib.dom.d.ts

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions lib/lib.dom.iterable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ interface Headers {
values(): IterableIterator<string>;
}

interface IDBDatabase {
/**
* Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
*/
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
}

interface IDBObjectStore {
/**
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
Expand Down
8 changes: 2 additions & 6 deletions lib/lib.es2015.iterable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ interface Set<T> {
*/
entries(): IterableIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set,
* Despite its name, returns an iterable of the values in the set.
*/
keys(): IterableIterator<T>;

Expand All @@ -194,7 +194,7 @@ interface ReadonlySet<T> {
entries(): IterableIterator<[T, T]>;

/**
* Despite its name, returns an iterable of the values in the set,
* Despite its name, returns an iterable of the values in the set.
*/
keys(): IterableIterator<T>;

Expand Down Expand Up @@ -242,10 +242,6 @@ interface PromiseConstructor {
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
}

declare namespace Reflect {
function enumerate(target: object): IterableIterator<any>;
}

interface String {
/** Iterator */
[Symbol.iterator](): IterableIterator<string>;
Expand Down
14 changes: 7 additions & 7 deletions lib/lib.es2015.promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface PromiseConstructor {
* a resolve callback used to resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;

/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
Expand Down Expand Up @@ -133,18 +133,18 @@ interface PromiseConstructor {
*/
reject<T = never>(reason?: any): Promise<T>;

/**
* Creates a new resolved promise.
* @returns A resolved promise.
*/
resolve(): Promise<void>;

/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve<T>(value: T | PromiseLike<T>): Promise<T>;

/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve(): Promise<void>;
}

declare var Promise: PromiseConstructor;
1 change: 0 additions & 1 deletion lib/lib.es2015.proxy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ interface ProxyHandler<T extends object> {
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
deleteProperty? (target: T, p: PropertyKey): boolean;
defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
enumerate? (target: T): PropertyKey[];
ownKeys? (target: T): PropertyKey[];
apply? (target: T, thisArg: any, argArray?: any): any;
construct? (target: T, argArray: any, newTarget?: any): object;
Expand Down
5 changes: 5 additions & 0 deletions lib/lib.es2015.symbol.wellknown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ interface SymbolConstructor {
}

interface Symbol {
/**
* Converts a Symbol object to a symbol.
*/
[Symbol.toPrimitive](hint: string): symbol;

readonly [Symbol.toStringTag]: string;
}

Expand Down
4 changes: 0 additions & 4 deletions lib/lib.es2017.sharedmemory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ interface SharedArrayBuffer {
*/
readonly byteLength: number;

/*
* The SharedArrayBuffer constructor's length property whose value is 1.
*/
length: number;
/**
* Returns a section of an SharedArrayBuffer.
*/
Expand Down
95 changes: 94 additions & 1 deletion lib/lib.es2020.bigint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,92 @@ and limitations under the License.
/// <reference no-default-lib="true"/>


interface BigIntToLocaleStringOptions {
/**
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.
*/
localeMatcher?: string;
/**
* The formatting style to use , the default is "decimal".
*/
style?: string;

numberingSystem?: string;
/**
* The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided.
*/
unit?: string;

/**
* The unit formatting style to use in unit formatting, the defaults is "short".
*/
unitDisplay?: string;

/**
* The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency".
*/
currency?: string;

/**
* How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol".
*
* "symbol" to use a localized currency symbol such as €,
*
* "code" to use the ISO currency code,
*
* "name" to use a localized currency name such as "dollar"
*/
currencyDisplay?: string;

/**
* Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true.
*/
useGrouping?: boolean;

/**
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
*/
minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;

/**
* The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information).
*/
minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;

/**
* The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0.
*/
maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;

/**
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
*/
minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;

/**
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
*/
maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;

/**
* The formatting that should be displayed for the number, the defaults is "standard"
*
* "standard" plain number formatting
*
* "scientific" return the order-of-magnitude for formatted number.
*
* "engineering" return the exponent of ten when divisible by three
*
* "compact" string representing exponent, defaults is using the "short" form
*/
notation?: string;

/**
* used only when notation is "compact"
*/
compactDisplay?: string;
}

interface BigInt {
/**
* Returns a string representation of an object.
Expand All @@ -26,7 +112,7 @@ interface BigInt {
toString(radix?: number): string;

/** Returns a string representation appropriate to the host environment's current locale. */
toLocaleString(): string;
toLocaleString(locales?: string, options?: BigIntToLocaleStringOptions): string;

/** Returns the primitive value of the specified object. */
valueOf(): bigint;
Expand Down Expand Up @@ -633,3 +719,10 @@ interface DataView {
*/
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
}

declare namespace Intl{
interface NumberFormat {
format(value: number | bigint): string;
resolvedOptions(): ResolvedNumberFormatOptions;
}
}
1 change: 1 addition & 0 deletions lib/lib.es2020.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and limitations under the License.
/// <reference lib="es2019" />
/// <reference lib="es2020.bigint" />
/// <reference lib="es2020.promise" />
/// <reference lib="es2020.sharedmemory" />
/// <reference lib="es2020.string" />
/// <reference lib="es2020.symbol.wellknown" />
/// <reference lib="es2020.intl" />
4 changes: 4 additions & 0 deletions lib/lib.es2020.intl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,17 @@ declare namespace Intl {
};

interface NumberFormatOptions {
compactDisplay?: string;
notation?: string;
signDisplay?: string;
unit?: string;
unitDisplay?: string;
}

interface ResolvedNumberFormatOptions {
compactDisplay?: string;
notation?: string;
signDisplay?: string;
unit?: string;
unitDisplay?: string;
}
Expand Down
99 changes: 99 additions & 0 deletions lib/lib.es2020.sharedmemory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


interface Atomics {
/**
* Adds a value to the value at the given position in the array, returning the original value.
* Until this atomic operation completes, any other read or write operation against the array
* will block.
*/
add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Stores the bitwise AND of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or
* write operation against the array will block.
*/
and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Replaces the value at the given position in the array if the original value equals the given
* expected value, returning the original value. Until this atomic operation completes, any
* other read or write operation against the array will block.
*/
compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint;

/**
* Replaces the value at the given position in the array, returning the original value. Until
* this atomic operation completes, any other read or write operation against the array will
* block.
*/
exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Returns the value at the given position in the array. Until this atomic operation completes,
* any other read or write operation against the array will block.
*/
load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint;

/**
* Stores the bitwise OR of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or write
* operation against the array will block.
*/
or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Stores a value at the given position in the array, returning the new value. Until this
* atomic operation completes, any other read or write operation against the array will block.
*/
store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* Subtracts a value from the value at the given position in the array, returning the original
* value. Until this atomic operation completes, any other read or write operation against the
* array will block.
*/
sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;

/**
* If the value at the given position in the array is equal to the provided value, the current
* agent is put to sleep causing execution to suspend until the timeout expires (returning
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
* `"not-equal"`.
*/
wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out";

/**
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
* number of agents that were awoken.
* @param typedArray A shared BigInt64Array.
* @param index The position in the typedArray to wake up on.
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
*/
notify(typedArray: BigInt64Array, index: number, count?: number): number;

/**
* Stores the bitwise XOR of a value with the value at the given position in the array,
* returning the original value. Until this atomic operation completes, any other read or write
* operation against the array will block.
*/
xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;
}
Loading