X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-tsserver%2Fnode_modules%2Ftypescript%2Flib%2Flib.es5.d.ts;h=8d9cf1eb22b00497bdfab38547fb5c4321b586be;hp=76564c9c6f52c930956c3308de2afe3f9a830ae2;hb=3be0a9efc698a9570a44456009afc6014812625a;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088 diff --git a/.config/coc/extensions/node_modules/coc-tsserver/node_modules/typescript/lib/lib.es5.d.ts b/.config/coc/extensions/node_modules/coc-tsserver/node_modules/typescript/lib/lib.es5.d.ts index 76564c9c..8d9cf1eb 100644 --- a/.config/coc/extensions/node_modules/coc-tsserver/node_modules/typescript/lib/lib.es5.d.ts +++ b/.config/coc/extensions/node_modules/coc-tsserver/node_modules/typescript/lib/lib.es5.d.ts @@ -33,12 +33,12 @@ declare function eval(x: string): any; /** * Converts a string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. * All other strings are considered decimal. */ -declare function parseInt(s: string, radix?: number): number; +declare function parseInt(string: string, radix?: number): number; /** * Converts a string to a floating-point number. @@ -84,12 +84,14 @@ declare function encodeURIComponent(uriComponent: string | number | boolean): st /** * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence. + * @deprecated A legacy feature for browser compatibility * @param string A string value */ declare function escape(string: string): string; /** * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. + * @deprecated A legacy feature for browser compatibility * @param string A string value */ declare function unescape(string: string): string; @@ -197,14 +199,14 @@ interface ObjectConstructor { * @param p The property name. * @param attributes Descriptor for the property. It can be for a data property or an accessor property. */ - defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType): any; + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; /** * Adds one or more properties to an object, and/or modifies attributes of existing properties. * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. */ - defineProperties(o: any, properties: PropertyDescriptorMap & ThisType): any; + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; /** * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. @@ -214,13 +216,13 @@ interface ObjectConstructor { /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. + * @param a Object on which to lock the attributes. */ freeze(a: T[]): readonly T[]; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. + * @param f Object on which to lock the attributes. */ freeze(f: T): T; @@ -503,6 +505,7 @@ interface String { // IE extensions /** * Gets a substring beginning at the specified location and having the specified length. + * @deprecated A legacy feature for browser compatibility * @param from The starting position of the desired substring. The index of the first character in the string is zero. * @param length The number of characters to include in the returned substring. */ @@ -614,6 +617,23 @@ interface TemplateStringsArray extends ReadonlyArray { interface ImportMeta { } +/** + * The type for the optional second argument to `import()`. + * + * If your host environment supports additional options, this type may be + * augmented via interface merging. + */ +interface ImportCallOptions { + assert?: ImportAssertions; +} + +/** + * The type for the `assert` property of the optional second argument to `import()`. + */ +interface ImportAssertions { + [key: string]: string; +} + interface Math { /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ readonly E: number; @@ -944,7 +964,8 @@ interface RegExp { lastIndex: number; // Non-standard extensions - compile(): this; + /** @deprecated A legacy feature for browser compatibility */ + compile(pattern: string, flags?: string): this; } interface RegExpConstructor { @@ -955,16 +976,44 @@ interface RegExpConstructor { readonly prototype: RegExp; // Non-standard extensions + /** @deprecated A legacy feature for browser compatibility */ $1: string; + /** @deprecated A legacy feature for browser compatibility */ $2: string; + /** @deprecated A legacy feature for browser compatibility */ $3: string; + /** @deprecated A legacy feature for browser compatibility */ $4: string; + /** @deprecated A legacy feature for browser compatibility */ $5: string; + /** @deprecated A legacy feature for browser compatibility */ $6: string; + /** @deprecated A legacy feature for browser compatibility */ $7: string; + /** @deprecated A legacy feature for browser compatibility */ $8: string; + /** @deprecated A legacy feature for browser compatibility */ $9: string; + /** @deprecated A legacy feature for browser compatibility */ + input: string; + /** @deprecated A legacy feature for browser compatibility */ + $_: string; + /** @deprecated A legacy feature for browser compatibility */ lastMatch: string; + /** @deprecated A legacy feature for browser compatibility */ + "$&": string; + /** @deprecated A legacy feature for browser compatibility */ + lastParen: string; + /** @deprecated A legacy feature for browser compatibility */ + "$+": string; + /** @deprecated A legacy feature for browser compatibility */ + leftContext: string; + /** @deprecated A legacy feature for browser compatibility */ + "$`": string; + /** @deprecated A legacy feature for browser compatibility */ + rightContext: string; + /** @deprecated A legacy feature for browser compatibility */ + "$'": string; } declare var RegExp: RegExpConstructor; @@ -1093,7 +1142,7 @@ interface ReadonlyArray { */ toString(): string; /** - * Returns a string representation of an array. The elements are converted to string using their toLocalString methods. + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. */ toLocaleString(): string; /** @@ -1227,7 +1276,7 @@ interface Array { */ toString(): string; /** - * Returns a string representation of an array. The elements are converted to string using their toLocalString methods. + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. */ toLocaleString(): string; /** @@ -1281,7 +1330,7 @@ interface Array { * Sorts an array in place. * This method mutates the array and returns a reference to the same array. * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. * ```ts * [11,2,22,1].sort((a, b) => a - b) @@ -1460,6 +1509,17 @@ interface Promise { catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } +/** + * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`. + */ +type Awaited = + T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode + T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped + F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument + Awaited : // recursively unwrap the value + never : // the argument to `then` was not callable + T; // non-object or non-thenable + interface ArrayLike { readonly length: number; readonly [n: number]: T; @@ -1528,7 +1588,7 @@ type Parameters any> = T extends (...args: infer P) /** * Obtain the parameters of a constructor function type in a tuple */ -type ConstructorParameters any> = T extends new (...args: infer P) => any ? P : never; +type ConstructorParameters any> = T extends abstract new (...args: infer P) => any ? P : never; /** * Obtain the return type of a function type @@ -1538,7 +1598,7 @@ type ReturnType any> = T extends (...args: any) => i /** * Obtain the return type of a constructor function type */ -type InstanceType any> = T extends new (...args: any) => infer R ? R : any; +type InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any; /** * Convert string literal type to uppercase @@ -1796,7 +1856,7 @@ interface Int8Array { every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -1966,7 +2026,7 @@ interface Int8Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -2078,7 +2138,7 @@ interface Uint8Array { every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -2248,7 +2308,7 @@ interface Uint8Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -2360,7 +2420,7 @@ interface Uint8ClampedArray { every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -2530,7 +2590,7 @@ interface Uint8ClampedArray { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -2641,7 +2701,7 @@ interface Int16Array { every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -2810,7 +2870,7 @@ interface Int16Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -2923,7 +2983,7 @@ interface Uint16Array { every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -3093,7 +3153,7 @@ interface Uint16Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -3205,7 +3265,7 @@ interface Int32Array { every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -3375,7 +3435,7 @@ interface Int32Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -3487,7 +3547,7 @@ interface Uint32Array { every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -3656,7 +3716,7 @@ interface Uint32Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -3768,7 +3828,7 @@ interface Float32Array { every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -3938,7 +3998,7 @@ interface Float32Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -4051,7 +4111,7 @@ interface Float64Array { every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean; /** - * Returns the this object after filling the section identified by start and end with value + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. @@ -4221,7 +4281,7 @@ interface Float64Array { * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -4283,12 +4343,12 @@ declare var Float64Array: Float64ArrayConstructor; declare namespace Intl { interface CollatorOptions { - usage?: string; - localeMatcher?: string; - numeric?: boolean; - caseFirst?: string; - sensitivity?: string; - ignorePunctuation?: boolean; + usage?: string | undefined; + localeMatcher?: string | undefined; + numeric?: boolean | undefined; + caseFirst?: string | undefined; + sensitivity?: string | undefined; + ignorePunctuation?: boolean | undefined; } interface ResolvedCollatorOptions { @@ -4312,17 +4372,17 @@ declare namespace Intl { }; interface NumberFormatOptions { - localeMatcher?: string; - style?: string; - currency?: string; - currencyDisplay?: string; - currencySign?: string; - useGrouping?: boolean; - minimumIntegerDigits?: number; - minimumFractionDigits?: number; - maximumFractionDigits?: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + localeMatcher?: string | undefined; + style?: string | undefined; + currency?: string | undefined; + currencyDisplay?: string | undefined; + currencySign?: string | undefined; + useGrouping?: boolean | undefined; + minimumIntegerDigits?: number | undefined; + minimumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; + maximumSignificantDigits?: number | undefined; } interface ResolvedNumberFormatOptions { @@ -4350,19 +4410,19 @@ declare namespace Intl { }; interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup"; - weekday?: "long" | "short" | "narrow"; - era?: "long" | "short" | "narrow"; - year?: "numeric" | "2-digit"; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow"; - day?: "numeric" | "2-digit"; - hour?: "numeric" | "2-digit"; - minute?: "numeric" | "2-digit"; - second?: "numeric" | "2-digit"; - timeZoneName?: "long" | "short"; - formatMatcher?: "best fit" | "basic"; - hour12?: boolean; - timeZone?: string; + localeMatcher?: "best fit" | "lookup" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; + year?: "numeric" | "2-digit" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + day?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; + timeZoneName?: "long" | "short" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; + hour12?: boolean | undefined; + timeZone?: string | undefined; } interface ResolvedDateTimeFormatOptions {