@better-typescript-lib/es2018
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -1,3 +0,1 @@ | ||
/// <reference no-default-lib="true"/> | ||
interface AsyncGenerator<T = unknown, TReturn = unknown, TNext = unknown> | ||
@@ -13,6 +11,3 @@ extends AsyncIterator<T, TReturn, TNext> { | ||
} | ||
// -------------------- | ||
// /// <reference lib="es2018.asynciterable" /> | ||
// | ||
// interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> { | ||
@@ -26,51 +21,50 @@ // // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. | ||
interface AsyncGeneratorFunction { | ||
/** | ||
* Creates a new AsyncGenerator object. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
new (...args: any[]): AsyncGenerator; | ||
/** | ||
* Creates a new AsyncGenerator object. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
(...args: any[]): AsyncGenerator; | ||
/** | ||
* The length of the arguments. | ||
*/ | ||
readonly length: number; | ||
/** | ||
* Returns the name of the function. | ||
*/ | ||
readonly name: string; | ||
/** | ||
* A reference to the prototype. | ||
*/ | ||
readonly prototype: AsyncGenerator; | ||
/** | ||
* Creates a new AsyncGenerator object. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
new (...args: any[]): AsyncGenerator; | ||
/** | ||
* Creates a new AsyncGenerator object. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
(...args: any[]): AsyncGenerator; | ||
/** | ||
* The length of the arguments. | ||
*/ | ||
readonly length: number; | ||
/** | ||
* Returns the name of the function. | ||
*/ | ||
readonly name: string; | ||
/** | ||
* A reference to the prototype. | ||
*/ | ||
readonly prototype: AsyncGenerator; | ||
} | ||
interface AsyncGeneratorFunctionConstructor { | ||
/** | ||
* Creates a new AsyncGenerator function. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
new (...args: string[]): AsyncGeneratorFunction; | ||
/** | ||
* Creates a new AsyncGenerator function. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
(...args: string[]): AsyncGeneratorFunction; | ||
/** | ||
* The length of the arguments. | ||
*/ | ||
readonly length: number; | ||
/** | ||
* Returns the name of the function. | ||
*/ | ||
readonly name: string; | ||
/** | ||
* A reference to the prototype. | ||
*/ | ||
readonly prototype: AsyncGeneratorFunction; | ||
/** | ||
* Creates a new AsyncGenerator function. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
new (...args: string[]): AsyncGeneratorFunction; | ||
/** | ||
* Creates a new AsyncGenerator function. | ||
* @param args A list of arguments the function accepts. | ||
*/ | ||
(...args: string[]): AsyncGeneratorFunction; | ||
/** | ||
* The length of the arguments. | ||
*/ | ||
readonly length: number; | ||
/** | ||
* Returns the name of the function. | ||
*/ | ||
readonly name: string; | ||
/** | ||
* A reference to the prototype. | ||
*/ | ||
readonly prototype: AsyncGeneratorFunction; | ||
} |
@@ -1,3 +0,11 @@ | ||
/// <reference no-default-lib="true"/> | ||
/// <reference lib="es2015.symbol" /> | ||
/// <reference lib="es2015.iterable" /> | ||
interface SymbolConstructor { | ||
/** | ||
* A method that returns the default async iterator for an object. Called by the semantics of | ||
* the for-await-of statement. | ||
*/ | ||
readonly asyncIterator: unique symbol; | ||
} | ||
interface AsyncIterator<T, TReturn = unknown, TNext = undefined> { | ||
@@ -11,15 +19,2 @@ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. | ||
} | ||
// -------------------- | ||
/// <reference lib="es2015.symbol" /> | ||
/// <reference lib="es2015.iterable" /> | ||
interface SymbolConstructor { | ||
/** | ||
* A method that returns the default async iterator for an object. Called by the semantics of | ||
* the for-await-of statement. | ||
*/ | ||
readonly asyncIterator: unique symbol; | ||
} | ||
// | ||
// | ||
// interface AsyncIterator<T, TReturn = any, TNext = undefined> { | ||
@@ -32,9 +27,8 @@ // // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. | ||
interface AsyncIterable<T> { | ||
[Symbol.asyncIterator](): AsyncIterator<T>; | ||
[Symbol.asyncIterator](): AsyncIterator<T>; | ||
} | ||
interface AsyncIterableIterator<T> extends AsyncIterator<T> { | ||
[Symbol.asyncIterator](): AsyncIterableIterator<T>; | ||
} | ||
[Symbol.asyncIterator](): AsyncIterableIterator<T>; | ||
} |
@@ -5,2 +5,2 @@ /// <reference lib="es2018" /> | ||
/// <reference lib="scripthost" /> | ||
/// <reference lib="dom.iterable" /> | ||
/// <reference lib="dom.iterable" /> |
@@ -0,0 +0,0 @@ /// <reference lib="es2017" /> |
114
intl.d.ts
declare namespace Intl { | ||
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories | ||
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; | ||
type PluralRuleType = "cardinal" | "ordinal"; | ||
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories | ||
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; | ||
type PluralRuleType = "cardinal" | "ordinal"; | ||
interface PluralRulesOptions { | ||
localeMatcher?: "lookup" | "best fit" | undefined; | ||
type?: PluralRuleType | undefined; | ||
minimumIntegerDigits?: number | undefined; | ||
minimumFractionDigits?: number | undefined; | ||
maximumFractionDigits?: number | undefined; | ||
minimumSignificantDigits?: number | undefined; | ||
maximumSignificantDigits?: number | undefined; | ||
} | ||
interface PluralRulesOptions { | ||
localeMatcher?: "lookup" | "best fit" | undefined; | ||
type?: PluralRuleType | undefined; | ||
minimumIntegerDigits?: number | undefined; | ||
minimumFractionDigits?: number | undefined; | ||
maximumFractionDigits?: number | undefined; | ||
minimumSignificantDigits?: number | undefined; | ||
maximumSignificantDigits?: number | undefined; | ||
} | ||
interface ResolvedPluralRulesOptions { | ||
locale: string; | ||
pluralCategories: LDMLPluralRule[]; | ||
type: PluralRuleType; | ||
minimumIntegerDigits: number; | ||
minimumFractionDigits: number; | ||
maximumFractionDigits: number; | ||
minimumSignificantDigits?: number; | ||
maximumSignificantDigits?: number; | ||
} | ||
interface ResolvedPluralRulesOptions { | ||
locale: string; | ||
pluralCategories: LDMLPluralRule[]; | ||
type: PluralRuleType; | ||
minimumIntegerDigits: number; | ||
minimumFractionDigits: number; | ||
maximumFractionDigits: number; | ||
minimumSignificantDigits?: number; | ||
maximumSignificantDigits?: number; | ||
} | ||
interface PluralRules { | ||
resolvedOptions(): ResolvedPluralRulesOptions; | ||
select(n: number): LDMLPluralRule; | ||
} | ||
interface PluralRules { | ||
resolvedOptions(): ResolvedPluralRulesOptions; | ||
select(n: number): LDMLPluralRule; | ||
} | ||
const PluralRules: { | ||
new ( | ||
locales?: string | string[], | ||
options?: PluralRulesOptions | ||
): PluralRules; | ||
(locales?: string | string[], options?: PluralRulesOptions): PluralRules; | ||
const PluralRules: { | ||
new (locales?: string | string[], options?: PluralRulesOptions): PluralRules; | ||
(locales?: string | string[], options?: PluralRulesOptions): PluralRules; | ||
supportedLocalesOf( | ||
locales: string | string[], | ||
options?: { localeMatcher?: "lookup" | "best fit" } | ||
): string[]; | ||
}; | ||
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[]; | ||
}; | ||
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here: | ||
type ES2018NumberFormatPartType = | ||
| "literal" | ||
| "nan" | ||
| "infinity" | ||
| "percent" | ||
| "integer" | ||
| "group" | ||
| "decimal" | ||
| "fraction" | ||
| "plusSign" | ||
| "minusSign" | ||
| "percentSign" | ||
| "currency" | ||
| "code" | ||
| "symbol" | ||
| "name"; | ||
type ES2020NumberFormatPartType = | ||
| "compact" | ||
| "exponentInteger" | ||
| "exponentMinusSign" | ||
| "exponentSeparator" | ||
| "unit" | ||
| "unknown"; | ||
type NumberFormatPartTypes = | ||
| ES2018NumberFormatPartType | ||
| ES2020NumberFormatPartType; | ||
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here: | ||
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name"; | ||
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown"; | ||
type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType; | ||
interface NumberFormatPart { | ||
type: NumberFormatPartTypes; | ||
value: string; | ||
} | ||
interface NumberFormatPart { | ||
type: NumberFormatPartTypes; | ||
value: string; | ||
} | ||
interface NumberFormat { | ||
formatToParts(number?: number | bigint): NumberFormatPart[]; | ||
} | ||
interface NumberFormat { | ||
formatToParts(number?: number | bigint): NumberFormatPart[]; | ||
} | ||
} |
{ | ||
"name": "@better-typescript-lib/es2018", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Better TypeScript standard library", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
@@ -5,9 +5,9 @@ /** | ||
interface Promise<T> { | ||
/** | ||
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The | ||
* resolved value cannot be modified from the callback. | ||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). | ||
* @returns A Promise for the completion of the callback. | ||
*/ | ||
finally(onfinally?: (() => void) | undefined | null): Promise<T> | ||
/** | ||
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The | ||
* resolved value cannot be modified from the callback. | ||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). | ||
* @returns A Promise for the completion of the callback. | ||
*/ | ||
finally(onfinally?: (() => void) | undefined | null): Promise<T>; | ||
} |
interface RegExpMatchArray { | ||
groups?: { | ||
[key: string]: string | ||
} | ||
groups?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
interface RegExpExecArray { | ||
groups?: { | ||
[key: string]: string | ||
} | ||
groups?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
interface RegExp { | ||
/** | ||
* Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. | ||
* Default is false. Read-only. | ||
*/ | ||
readonly dotAll: boolean; | ||
} | ||
/** | ||
* Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. | ||
* Default is false. Read-only. | ||
*/ | ||
readonly dotAll: boolean; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208
18921