Update version to 5.0.0-beta, accept baselines, and LKG.

This commit is contained in:
Daniel Rosenwasser
2023-01-23 00:58:41 +00:00
parent 31b4ec503c
commit aa8df3ea0b
42 changed files with 35161 additions and 26720 deletions
+357
View File
@@ -0,0 +1,357 @@
/*! *****************************************************************************
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"/>
/**
* The decorator context types provided to class member decorators.
*/
type ClassMemberDecoratorContext =
| ClassMethodDecoratorContext
| ClassGetterDecoratorContext
| ClassSetterDecoratorContext
| ClassFieldDecoratorContext
| ClassAccessorDecoratorContext
;
/**
* The decorator context types provided to any decorator.
*/
type DecoratorContext =
| ClassDecoratorContext
| ClassMemberDecoratorContext
;
/**
* Context provided to a class decorator.
* @template Class The type of the decorated class associated with this context.
*/
interface ClassDecoratorContext<
Class extends abstract new (...args: any) => any = abstract new (...args: any) => any,
> {
/** The kind of element that was decorated. */
readonly kind: "class";
/** The name of the decorated class. */
readonly name: string | undefined;
/**
* Adds a callback to be invoked after the class definition has been finalized.
*
* @example
* ```ts
* function customElement(name: string): ClassDecoratorFunction {
* return (target, context) => {
* context.addInitializer(function () {
* customElements.define(name, this);
* });
* }
* }
*
* @customElement("my-element")
* class MyElement {}
* ```
*/
addInitializer(initializer: (this: Class) => void): void;
}
/**
* Context provided to a class method decorator.
* @template This The type on which the class element will be defined. For a static class element, this will be
* the type of the constructor. For a non-static class element, this will be the type of the instance.
* @template Value The type of the decorated class method.
*/
interface ClassMethodDecoratorContext<
This = unknown,
Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any,
> {
/** The kind of class member that was decorated. */
readonly kind: "method";
/** The name of the decorated class member. */
readonly name: string | symbol;
/** A value indicating whether the class member is a static (`true`) or instance (`false`) member. */
readonly static: boolean;
/** A value indicating whether the class member has a private name. */
readonly private: boolean;
// NOTE: Disabled, pending the outcome of https://github.com/tc39/proposal-decorators/issues/494
// /** An object that can be used to access the current value of the class member at runtime. */
// readonly access: {
// /**
// * Gets the current value of the method from the provided receiver.
// *
// * @example
// * let fn = context.access.get.call(instance);
// */
// get(this: This): Value;
// };
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` member), or before instance initializers are run (when
* decorating a non-`static` member).
*
* @example
* ```ts
* const bound: ClassMethodDecoratorFunction = (value, context) {
* if (context.private) throw new TypeError("Not supported on private methods.");
* context.addInitializer(function () {
* this[context.name] = this[context.name].bind(this);
* });
* }
*
* class C {
* message = "Hello";
*
* @bound
* m() {
* console.log(this.message);
* }
* }
* ```
*/
addInitializer(initializer: (this: This) => void): void;
}
/**
* Context provided to a class getter decorator.
* @template This The type on which the class element will be defined. For a static class element, this will be
* the type of the constructor. For a non-static class element, this will be the type of the instance.
* @template Value The property type of the decorated class getter.
*/
interface ClassGetterDecoratorContext<
This = unknown,
Value = unknown,
> {
/** The kind of class member that was decorated. */
readonly kind: "getter";
/** The name of the decorated class member. */
readonly name: string | symbol;
/** A value indicating whether the class member is a static (`true`) or instance (`false`) member. */
readonly static: boolean;
/** A value indicating whether the class member has a private name. */
readonly private: boolean;
// NOTE: Disabled, pending the outcome of https://github.com/tc39/proposal-decorators/issues/494
// /** An object that can be used to access the current value of the class member at runtime. */
// readonly access: {
// /**
// * Invokes the getter on the provided receiver.
// *
// * @example
// * let value = context.access.get.call(instance);
// */
// get(this: This): Value;
// };
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` member), or before instance initializers are run (when
* decorating a non-`static` member).
*/
addInitializer(initializer: (this: This) => void): void;
}
/**
* Context provided to a class setter decorator.
* @template This The type on which the class element will be defined. For a static class element, this will be
* the type of the constructor. For a non-static class element, this will be the type of the instance.
* @template Value The type of the decorated class setter.
*/
interface ClassSetterDecoratorContext<
This = unknown,
Value = unknown,
> {
/** The kind of class member that was decorated. */
readonly kind: "setter";
/** The name of the decorated class member. */
readonly name: string | symbol;
/** A value indicating whether the class member is a static (`true`) or instance (`false`) member. */
readonly static: boolean;
/** A value indicating whether the class member has a private name. */
readonly private: boolean;
// NOTE: Disabled, pending the outcome of https://github.com/tc39/proposal-decorators/issues/494
/** An object that can be used to access the current value of the class member at runtime. */
// readonly access: {
// /**
// * Invokes the setter on the provided receiver.
// *
// * @example
// * context.access.set.call(instance, value);
// */
// set(this: This, value: Value): void;
// };
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` member), or before instance initializers are run (when
* decorating a non-`static` member).
*/
addInitializer(initializer: (this: This) => void): void;
}
/**
* Context provided to a class `accessor` field decorator.
* @template This The type on which the class element will be defined. For a static class element, this will be
* the type of the constructor. For a non-static class element, this will be the type of the instance.
* @template Value The type of decorated class field.
*/
interface ClassAccessorDecoratorContext<
This = unknown,
Value = unknown,
> {
/** The kind of class member that was decorated. */
readonly kind: "accessor";
/** The name of the decorated class member. */
readonly name: string | symbol;
/** A value indicating whether the class member is a static (`true`) or instance (`false`) member. */
readonly static: boolean;
/** A value indicating whether the class member has a private name. */
readonly private: boolean;
// NOTE: Disabled, pending the outcome of https://github.com/tc39/proposal-decorators/issues/494
// /** An object that can be used to access the current value of the class member at runtime. */
// readonly access: {
// /**
// * Invokes the getter on the provided receiver.
// *
// * @example
// * let value = context.access.get.call(instance);
// */
// get(this: This): Value;
// /**
// * Invokes the setter on the provided receiver.
// *
// * @example
// * context.access.set.call(instance, value);
// */
// set(this: This, value: Value): void;
// };
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` member), or before instance initializers are run (when
* decorating a non-`static` member).
*/
addInitializer(initializer: (this: This) => void): void;
}
/**
* Describes the target provided to class `accessor` field decorators.
* @template This The `this` type to which the target applies.
* @template Value The property type for the class `accessor` field.
*/
interface ClassAccessorDecoratorTarget<This, Value> {
/**
* Invokes the getter that was defined prior to decorator application.
*
* @example
* let value = target.get.call(instance);
*/
get(this: This): Value;
/**
* Invokes the setter that was defined prior to decorator application.
*
* @example
* target.set.call(instance, value);
*/
set(this: This, value: Value): void;
}
/**
* Describes the allowed return value from a class `accessor` field decorator.
* @template This The `this` type to which the target applies.
* @template Value The property type for the class `accessor` field.
*/
interface ClassAccessorDecoratorResult<This, Value> {
/**
* An optional replacement getter function. If not provided, the existing getter function is used instead.
*/
get?(this: This): Value;
/**
* An optional replacement setter function. If not provided, the existing setter function is used instead.
*/
set?(this: This, value: Value): void;
/**
* An optional initializer mutator that is invoked when the underlying field initializer is evaluated.
* @param value The incoming initializer value.
* @returns The replacement initializer value.
*/
init?(this: This, value: Value): Value;
}
/**
* Context provided to a class field decorator.
* @template This The type on which the class element will be defined. For a static class element, this will be
* the type of the constructor. For a non-static class element, this will be the type of the instance.
* @template Value The type of the decorated class field.
*/
interface ClassFieldDecoratorContext<
This = unknown,
Value = unknown,
> {
/** The kind of class member that was decorated. */
readonly kind: "field";
/** The name of the decorated class member. */
readonly name: string | symbol;
/** A value indicating whether the class member is a static (`true`) or instance (`false`) member. */
readonly static: boolean;
/** A value indicating whether the class member has a private name. */
readonly private: boolean;
// NOTE: Disabled, pending the outcome of https://github.com/tc39/proposal-decorators/issues/494
// /** An object that can be used to access the current value of the class member at runtime. */
// readonly access: {
// /**
// * Gets the value of the field on the provided receiver.
// */
// get(this: This): Value;
// /**
// * Sets the value of the field on the provided receiver.
// */
// set(this: This, value: Value): void;
// };
/**
* Adds a callback to be invoked either before static initializers are run (when
* decorating a `static` member), or before instance initializers are run (when
* decorating a non-`static` member).
*/
addInitializer(initializer: (this: This) => void): void;
}
+24
View File
@@ -0,0 +1,24 @@
/*! *****************************************************************************
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"/>
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+2306 -2083
View File
File diff suppressed because it is too large Load Diff
+14
View File
@@ -34,6 +34,10 @@ interface BaseAudioContext {
createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
}
interface CSSKeyframesRule {
[Symbol.iterator](): IterableIterator<CSSKeyframeRule>;
}
interface CSSRuleList {
[Symbol.iterator](): IterableIterator<CSSRule>;
}
@@ -137,6 +141,16 @@ interface IDBObjectStore {
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
}
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
}
interface MIDIOutput {
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
}
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
}
interface MediaKeyStatusMap {
[Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
+344
View File
@@ -0,0 +1,344 @@
/*! *****************************************************************************
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 Array<T> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number;
}
interface ReadonlyArray<T> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
}
interface Int8Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number;
}
interface Uint8Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number;
}
interface Uint8ClampedArray {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number;
}
interface Int16Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number;
}
interface Uint16Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number;
}
interface Int32Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number;
}
interface Uint32Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number;
}
interface Float32Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number;
}
interface Float64Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number;
}
interface BigInt64Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number;
}
interface BigUint64Array {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number;
}
+22
View File
@@ -0,0 +1,22 @@
/*! *****************************************************************************
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"/>
/// <reference lib="es2022" />
/// <reference lib="es2023.array" />
+25
View File
@@ -0,0 +1,25 @@
/*! *****************************************************************************
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"/>
/// <reference lib="es2023" />
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
+3 -12
View File
@@ -18,6 +18,9 @@ and limitations under the License.
/// <reference no-default-lib="true"/>
/// <reference lib="decorators" />
/// <reference lib="decorators.legacy" />
/////////////////////////////
/// ECMAScript APIs
/////////////////////////////
@@ -1137,13 +1140,6 @@ interface JSON {
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: Function | Symbol | undefined, replacer?: (number | string)[] | null, space?: string | number): undefined;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
@@ -1510,11 +1506,6 @@ interface TypedPropertyDescriptor<T> {
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
interface PromiseLike<T> {
+1 -1
View File
@@ -18,5 +18,5 @@ and limitations under the License.
/// <reference no-default-lib="true"/>
/// <reference lib="es2022" />
/// <reference lib="es2023" />
/// <reference lib="esnext.intl" />
+1670 -1632
View File
File diff suppressed because it is too large Load Diff
+5917 -2395
View File
File diff suppressed because it is too large Load Diff
+7795 -6237
View File
File diff suppressed because it is too large Load Diff
+289 -1080
View File
File diff suppressed because it is too large Load Diff
+7777 -5978
View File
File diff suppressed because one or more lines are too long
+225 -1056
View File
File diff suppressed because it is too large Load Diff
+7535 -5428
View File
File diff suppressed because one or more lines are too long
+637 -702
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.0.0",
"version": "5.0.0-beta",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
+1 -1
View File
@@ -4,7 +4,7 @@ export const versionMajorMinor = "5.0";
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
export const version: string = `${versionMajorMinor}.0-dev`;
export const version: string = `${versionMajorMinor}.0-beta`;
/**
* Type of objects whose values are all of the same type.
@@ -1,6 +1,8 @@
error TS2468: Cannot find global value 'Promise'.
tests/cases/conformance/node/other.cts(2,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other.cts(3,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
tests/cases/conformance/node/other.cts(3,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other.cts(4,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
tests/cases/conformance/node/other.cts(4,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other.cts(5,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other.mts(2,18): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
@@ -20,6 +22,7 @@ tests/cases/conformance/node/other.ts(4,24): error TS2712: A dynamic import call
tests/cases/conformance/node/other.ts(5,18): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
tests/cases/conformance/node/other.ts(5,24): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other2.cts(2,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other2.cts(3,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
tests/cases/conformance/node/other2.cts(3,18): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
tests/cases/conformance/node/other2.mts(2,18): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
tests/cases/conformance/node/other2.mts(2,24): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
@@ -109,26 +112,32 @@ tests/cases/conformance/node/other2.ts(3,24): error TS2712: A dynamic import cal
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
==== tests/cases/conformance/node/other.cts (4 errors) ====
==== tests/cases/conformance/node/other.cts (6 errors) ====
// cjs format file, no TLA
export const a = import("package/cjs");
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
export const b = import("package/mjs");
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
export const c = import("package");
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
export const f = import("inner");
~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
==== tests/cases/conformance/node/other2.cts (2 errors) ====
==== tests/cases/conformance/node/other2.cts (3 errors) ====
// cjs format file, no TLA
export const d = import("inner/cjs");
~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
export const e = import("inner/mjs");
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ====
@@ -153,19 +153,3 @@ export declare const d: {
cjsNonmain: true;
};
export declare const e: typeof import("inner/mjs");
//// [other.d.cts]
export declare const a: Promise<{
default: typeof import("./index.cjs");
}>;
export declare const b: Promise<typeof import("./index.mjs", { assert: { "resolution-mode": "import" } })>;
export declare const c: Promise<typeof import("./index.js", { assert: { "resolution-mode": "import" } })>;
export declare const f: Promise<{
default: typeof import("inner");
cjsMain: true;
}>;
//// [other2.d.cts]
export declare const d: Promise<{
default: typeof import("inner/cjs");
cjsNonmain: true;
}>;
export declare const e: Promise<typeof import("inner/mjs", { assert: { "resolution-mode": "import" } })>;
@@ -1,26 +1,44 @@
/index.ts(1,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(6,50): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(7,49): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(10,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(11,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (3 errors) ====
==== /index.ts (9 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface LocalInterface extends RequireInterface, ImportInterface {}
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
@@ -1,26 +1,44 @@
/index.ts(1,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,50): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(6,50): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(7,49): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(7,49): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(10,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(11,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (3 errors) ====
==== /index.ts (9 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface LocalInterface extends RequireInterface, ImportInterface {}
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
@@ -1,11 +1,21 @@
/index.ts(1,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(6,50): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(7,49): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(10,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(11,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (3 errors) ====
==== /index.ts (9 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface LocalInterface extends RequireInterface, ImportInterface {}
@@ -14,13 +24,21 @@
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
@@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
export {};
//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
@@ -1,11 +1,21 @@
/index.ts(1,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
/index.ts(6,50): error TS1454: `resolution-mode` can only be set for type-only imports.
/index.ts(6,50): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,49): error TS1454: `resolution-mode` can only be set for type-only imports.
/index.ts(7,49): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(10,45): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(11,44): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (3 errors) ====
==== /index.ts (9 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface LocalInterface extends RequireInterface, ImportInterface {}
@@ -14,13 +24,21 @@
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
@@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
export {};
//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
@@ -2,10 +2,11 @@
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(4,39): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(4,39): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,76): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
==== /index.ts (5 errors) ====
==== /index.ts (6 errors) ====
// incorrect mode
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -18,6 +19,8 @@
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
// not exclusively type-only
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -30,10 +30,3 @@ export interface LocalInterface extends RequireInterface, ImportInterface {}
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [index.d.ts]
import type { RequireInterface } from "pkg";
import { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
@@ -2,10 +2,11 @@
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(4,39): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(4,39): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,76): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
==== /index.ts (5 errors) ====
==== /index.ts (6 errors) ====
// incorrect mode
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -18,6 +19,8 @@
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
// not exclusively type-only
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -30,10 +30,3 @@ export interface LocalInterface extends RequireInterface, ImportInterface {}
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [index.d.ts]
import type { RequireInterface } from "pkg";
import { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
@@ -0,0 +1,38 @@
/index.ts(2,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(3,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(5,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (5 errors) ====
export type LocalInterface =
& import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
& import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface);
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
"name": "pkg",
"version": "0.0.1",
"exports": {
"import": "./import.js",
"require": "./require.js"
}
}
==== /node_modules/pkg/import.d.ts (0 errors) ====
export interface ImportInterface {}
==== /node_modules/pkg/require.d.ts (0 errors) ====
export interface RequireInterface {}
@@ -28,9 +28,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.b = exports.a = void 0;
exports.a = null;
exports.b = null;
//// [index.d.ts]
export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
export declare const a: import("pkg").RequireInterface;
export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
@@ -0,0 +1,38 @@
/index.ts(2,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(3,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(5,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /index.ts (5 errors) ====
export type LocalInterface =
& import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
& import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const a = (null as any as import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface);
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /node_modules/pkg/package.json (0 errors) ====
{
"name": "pkg",
"version": "0.0.1",
"exports": {
"import": "./import.js",
"require": "./require.js"
}
}
==== /node_modules/pkg/import.d.ts (0 errors) ====
export interface ImportInterface {}
==== /node_modules/pkg/require.d.ts (0 errors) ====
export interface RequireInterface {}
@@ -28,9 +28,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.b = exports.a = void 0;
exports.a = null;
exports.b = null;
//// [index.d.ts]
export type LocalInterface = import("pkg", { assert: { "resolution-mode": "require" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
export declare const a: import("pkg").RequireInterface;
export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
@@ -1,6 +1,9 @@
error TS2468: Cannot find global value 'Promise'.
/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(3,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(6,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'?
/other.ts(3,22): error TS1005: 'assert' expected.
/other.ts(3,39): error TS1005: ';' expected.
@@ -94,17 +97,23 @@ error TS2468: Cannot find global value 'Promise'.
export interface ImportInterface {}
==== /node_modules/pkg/require.d.ts (0 errors) ====
export interface RequireInterface {}
==== /index.ts (2 errors) ====
==== /index.ts (5 errors) ====
export type LocalInterface =
& import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface
~~~~~~~~
!!! error TS1453: `resolution-mode` should be either `require` or `import`.
& import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface);
~~~~~~~~
!!! error TS1453: `resolution-mode` should be either `require` or `import`.
export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface);
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /other.ts (28 errors) ====
// missing assert:
export type LocalInterface =
@@ -119,10 +119,6 @@ exports.a = null;
exports.b = null;
//// [index.d.ts]
export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
export declare const a: import("pkg").RequireInterface;
export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
//// [other.d.ts]
export type LocalInterface = import("pkg", { assert: {} });
export declare const a: any;
@@ -1,6 +1,9 @@
error TS2468: Cannot find global value 'Promise'.
/index.ts(2,51): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(3,31): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(5,78): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(6,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,58): error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/other.ts(3,7): error TS1340: Module 'pkg' does not refer to a type, but is used as a type here. Did you mean 'typeof import('pkg')'?
/other.ts(3,22): error TS1005: 'assert' expected.
/other.ts(3,39): error TS1005: ';' expected.
@@ -94,17 +97,23 @@ error TS2468: Cannot find global value 'Promise'.
export interface ImportInterface {}
==== /node_modules/pkg/require.d.ts (0 errors) ====
export interface RequireInterface {}
==== /index.ts (2 errors) ====
==== /index.ts (5 errors) ====
export type LocalInterface =
& import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface
~~~~~~~~
!!! error TS1453: `resolution-mode` should be either `require` or `import`.
& import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export const a = (null as any as import("pkg", { assert: {"resolution-mode": "foobar"} }).RequireInterface);
~~~~~~~~
!!! error TS1453: `resolution-mode` should be either `require` or `import`.
export const b = (null as any as import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface);
~
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
==== /other.ts (28 errors) ====
// missing assert:
export type LocalInterface =
@@ -119,10 +119,6 @@ exports.a = null;
exports.b = null;
//// [index.d.ts]
export type LocalInterface = import("pkg", { assert: { "resolution-mode": "foobar" } }).RequireInterface & import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
export declare const a: import("pkg").RequireInterface;
export declare const b: import("pkg", { assert: { "resolution-mode": "import" } }).ImportInterface;
//// [other.d.ts]
export type LocalInterface = import("pkg", { assert: {} });
export declare const a: any;
@@ -118,12 +118,22 @@ File '/user/username/projects/myproject/node_modules/pkg/package.json' exists ac
File '/a/lib/package.json' does not exist.
File '/a/package.json' does not exist.
File '/package.json' does not exist according to earlier cached lookups.
index.ts:1:44 - error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1 import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index.ts:2:39 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~
[12:00:44 AM] Found 1 error. Watching for file changes.
index.ts:2:46 - error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[12:00:44 AM] Found 3 errors. Watching for file changes.
@@ -256,12 +266,27 @@ Reusing resolution of module 'pkg1' from '/user/username/projects/myproject/inde
File '/a/lib/package.json' does not exist according to earlier cached lookups.
File '/a/package.json' does not exist according to earlier cached lookups.
File '/package.json' does not exist according to earlier cached lookups.
a.ts:2:44 - error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2 import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" }
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index.ts:1:44 - error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1 import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index.ts:2:39 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~
[12:00:54 AM] Found 1 error. Watching for file changes.
index.ts:2:46 - error TS4125: 'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" };
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[12:00:54 AM] Found 4 errors. Watching for file changes.