Add CI job that detects unused baselines (#54141)
This commit is contained in:
Родитель
e9cbebbc89
Коммит
910efac23e
|
@ -202,3 +202,30 @@ jobs:
|
|||
|
||||
- name: Self build
|
||||
run: npx hereby build-src --built
|
||||
|
||||
unused-baselines:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "*"
|
||||
check-latest: true
|
||||
- run: npm ci
|
||||
|
||||
- name: Remove all baselines
|
||||
run: rm -rf tests/baselines/reference
|
||||
|
||||
- name: Run tests
|
||||
run: npm test &> /dev/null || exit 0
|
||||
|
||||
- name: Accept baselines
|
||||
run: npx hereby baseline-accept
|
||||
|
||||
- name: Check for unused baselines
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Unused baselines:"
|
||||
git diff --exit-code --name-only
|
||||
fi
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
//// [NonNullableInNonStrictMode.ts]
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
type T1 = NonNullable<undefined>;
|
||||
type T2 = null & {};
|
||||
type T3 = undefined & {};
|
||||
type T4 = null & undefined;
|
||||
type T6 = null & { a: string } & {};
|
||||
|
||||
// Repro from #50519
|
||||
|
||||
type NonNullableNew<T> = T & {};
|
||||
type NonNullableOld<T> = T extends null | undefined ? never : T;
|
||||
|
||||
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
|
||||
|
||||
//// [NonNullableInNonStrictMode.js]
|
||||
// These should all resolve to never
|
|
@ -1,45 +0,0 @@
|
|||
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
>T0 : Symbol(T0, Decl(NonNullableInNonStrictMode.ts, 0, 0))
|
||||
>NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
type T1 = NonNullable<undefined>;
|
||||
>T1 : Symbol(T1, Decl(NonNullableInNonStrictMode.ts, 2, 28))
|
||||
>NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
type T2 = null & {};
|
||||
>T2 : Symbol(T2, Decl(NonNullableInNonStrictMode.ts, 3, 33))
|
||||
|
||||
type T3 = undefined & {};
|
||||
>T3 : Symbol(T3, Decl(NonNullableInNonStrictMode.ts, 4, 20))
|
||||
|
||||
type T4 = null & undefined;
|
||||
>T4 : Symbol(T4, Decl(NonNullableInNonStrictMode.ts, 5, 25))
|
||||
|
||||
type T6 = null & { a: string } & {};
|
||||
>T6 : Symbol(T6, Decl(NonNullableInNonStrictMode.ts, 6, 27))
|
||||
>a : Symbol(a, Decl(NonNullableInNonStrictMode.ts, 7, 18))
|
||||
|
||||
// Repro from #50519
|
||||
|
||||
type NonNullableNew<T> = T & {};
|
||||
>NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36))
|
||||
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20))
|
||||
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20))
|
||||
|
||||
type NonNullableOld<T> = T extends null | undefined ? never : T;
|
||||
>NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32))
|
||||
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
|
||||
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
|
||||
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
|
||||
|
||||
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
|
||||
>IsNullWithoutStrictNullChecks : Symbol(IsNullWithoutStrictNullChecks, Decl(NonNullableInNonStrictMode.ts, 12, 64))
|
||||
>NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36))
|
||||
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
>IsAlwaysNever : Symbol(IsAlwaysNever, Decl(NonNullableInNonStrictMode.ts, 14, 58))
|
||||
>NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32))
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
|
||||
// These should all resolve to never
|
||||
|
||||
type T0 = NonNullable<null>;
|
||||
>T0 : never
|
||||
>null : null
|
||||
|
||||
type T1 = NonNullable<undefined>;
|
||||
>T1 : never
|
||||
|
||||
type T2 = null & {};
|
||||
>T2 : never
|
||||
>null : null
|
||||
|
||||
type T3 = undefined & {};
|
||||
>T3 : never
|
||||
|
||||
type T4 = null & undefined;
|
||||
>T4 : never
|
||||
>null : null
|
||||
|
||||
type T6 = null & { a: string } & {};
|
||||
>T6 : never
|
||||
>null : null
|
||||
>a : string
|
||||
|
||||
// Repro from #50519
|
||||
|
||||
type NonNullableNew<T> = T & {};
|
||||
>NonNullableNew : NonNullableNew<T>
|
||||
|
||||
type NonNullableOld<T> = T extends null | undefined ? never : T;
|
||||
>NonNullableOld : NonNullableOld<T>
|
||||
>null : null
|
||||
|
||||
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
|
||||
>IsNullWithoutStrictNullChecks : never
|
||||
>null : null
|
||||
|
||||
type IsAlwaysNever = NonNullableOld<null>;
|
||||
>IsAlwaysNever : never
|
||||
>null : null
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.ts(8,4): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.ts (1 errors) ====
|
||||
// repro from #52588
|
||||
|
||||
declare function test(
|
||||
arg: Record<string, (arg: string) => void> | Array<(arg: number) => void>
|
||||
): void;
|
||||
|
||||
test([
|
||||
(arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg; // number
|
||||
},
|
||||
]);
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.ts(8,4): error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.ts (1 errors) ====
|
||||
// repro from #52588
|
||||
|
||||
declare function test(
|
||||
arg: Record<string, (arg: string) => void> | Array<(arg: number) => void>
|
||||
): void;
|
||||
|
||||
test([
|
||||
(arg) => {
|
||||
~~~
|
||||
!!! error TS7006: Parameter 'arg' implicitly has an 'any' type.
|
||||
arg; // number
|
||||
},
|
||||
]);
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
//// [esDecorators-classDeclaration-nonStatic-methods.ts]
|
||||
declare let dec: any;
|
||||
|
||||
const method3 = "method3";
|
||||
|
||||
class C {
|
||||
@dec
|
||||
method1() {}
|
||||
|
||||
@dec
|
||||
["method2"]() {}
|
||||
|
||||
@dec
|
||||
[method3]() {}
|
||||
}
|
||||
|
||||
|
||||
//// [esDecorators-classDeclaration-nonStatic-methods.js]
|
||||
const method3 = "method3";
|
||||
let C = (() => {
|
||||
var _a;
|
||||
var _b;
|
||||
let _instanceExtraInitializers = [];
|
||||
let _method1_decorators;
|
||||
let _member_decorators;
|
||||
let _member_decorators_1;
|
||||
return _a = class C {
|
||||
method1() { }
|
||||
[(_method1_decorators = [dec], _member_decorators = [dec], "method2")]() { }
|
||||
[(_member_decorators_1 = [dec], _b = __propKey(method3))]() { }
|
||||
constructor() {
|
||||
__runInitializers(this, _instanceExtraInitializers);
|
||||
}
|
||||
},
|
||||
(() => {
|
||||
__esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { get() { return this.method1; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { get() { return this["method2"]; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { get() { return this[_b]; } } }, null, _instanceExtraInitializers);
|
||||
})(),
|
||||
_a;
|
||||
})();
|
|
@ -1,39 +0,0 @@
|
|||
//// [esDecorators-classDeclaration-nonStatic-methods.ts]
|
||||
declare let dec: any;
|
||||
|
||||
const method3 = "method3";
|
||||
|
||||
class C {
|
||||
@dec
|
||||
method1() {}
|
||||
|
||||
@dec
|
||||
["method2"]() {}
|
||||
|
||||
@dec
|
||||
[method3]() {}
|
||||
}
|
||||
|
||||
|
||||
//// [esDecorators-classDeclaration-nonStatic-methods.js]
|
||||
const method3 = "method3";
|
||||
let C = (() => {
|
||||
var _a;
|
||||
let _instanceExtraInitializers = [];
|
||||
let _method1_decorators;
|
||||
let _member_decorators;
|
||||
let _member_decorators_1;
|
||||
return class C {
|
||||
static {
|
||||
__esDecorate(this, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { get() { return this.method1; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(this, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { get() { return this["method2"]; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(this, null, _member_decorators_1, { kind: "method", name: _a, static: false, private: false, access: { get() { return this[_a]; } } }, null, _instanceExtraInitializers);
|
||||
}
|
||||
method1() { }
|
||||
[(_method1_decorators = [dec], _member_decorators = [dec], "method2")]() { }
|
||||
[(_member_decorators_1 = [dec], _a = __propKey(method3))]() { }
|
||||
constructor() {
|
||||
__runInitializers(this, _instanceExtraInitializers);
|
||||
}
|
||||
};
|
||||
})();
|
|
@ -1,43 +0,0 @@
|
|||
//// [esDecorators-classDeclaration-nonStatic-methods.ts]
|
||||
declare let dec: any;
|
||||
|
||||
const method3 = "method3";
|
||||
|
||||
class C {
|
||||
@dec
|
||||
method1() {}
|
||||
|
||||
@dec
|
||||
["method2"]() {}
|
||||
|
||||
@dec
|
||||
[method3]() {}
|
||||
}
|
||||
|
||||
|
||||
//// [esDecorators-classDeclaration-nonStatic-methods.js]
|
||||
var _this = this;
|
||||
var method3 = "method3";
|
||||
var C = function () {
|
||||
var _a;
|
||||
var _b;
|
||||
var _instanceExtraInitializers = [];
|
||||
var _method1_decorators;
|
||||
var _member_decorators;
|
||||
var _member_decorators_1;
|
||||
return _a = /** @class */ (function () {
|
||||
function C() {
|
||||
__runInitializers(this, _instanceExtraInitializers);
|
||||
}
|
||||
C.prototype.method1 = function () { };
|
||||
C.prototype[(_method1_decorators = [dec], _member_decorators = [dec], "method2")] = function () { };
|
||||
C.prototype[(_member_decorators_1 = [dec], _b = __propKey(method3))] = function () { };
|
||||
return C;
|
||||
}()),
|
||||
(function () {
|
||||
__esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { get: function () { return this.method1; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { get: function () { return this["method2"]; } } }, null, _instanceExtraInitializers);
|
||||
__esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { get: function () { return this[_b]; } } }, null, _instanceExtraInitializers);
|
||||
})(),
|
||||
_a;
|
||||
}();
|
|
@ -1,27 +0,0 @@
|
|||
//// [esDecorators-classDeclaration-nonStatic-methods.ts]
|
||||
declare let dec: any;
|
||||
|
||||
const method3 = "method3";
|
||||
|
||||
class C {
|
||||
@dec
|
||||
method1() {}
|
||||
|
||||
@dec
|
||||
["method2"]() {}
|
||||
|
||||
@dec
|
||||
[method3]() {}
|
||||
}
|
||||
|
||||
|
||||
//// [esDecorators-classDeclaration-nonStatic-methods.js]
|
||||
const method3 = "method3";
|
||||
class C {
|
||||
@dec
|
||||
method1() { }
|
||||
@dec
|
||||
["method2"]() { }
|
||||
@dec
|
||||
[method3]() { }
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
//// [tests/cases/conformance/esDecorators/classDeclaration/esDecorators-classDeclaration-setFunctionName1.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
declare let dec: any;
|
||||
|
||||
@dec class C {}
|
||||
|
||||
export {}
|
||||
|
||||
//// [b.ts]
|
||||
declare let dec: any;
|
||||
|
||||
@dec export class C {}
|
||||
|
||||
//// [c.ts]
|
||||
declare let dec: any;
|
||||
|
||||
@dec export default class C {}
|
||||
|
||||
//// [c.ts]
|
||||
declare let dec: any;
|
||||
|
||||
@dec export default class {}
|
||||
|
||||
|
||||
//// [a.js]
|
||||
let C = (() => {
|
||||
let _classDecorators = [dec];
|
||||
let _classDescriptor;
|
||||
let _classExtraInitializers = [];
|
||||
let _classThis;
|
||||
var C = class {
|
||||
static {
|
||||
__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, _classExtraInitializers);
|
||||
C = _classThis = _classDescriptor.value;
|
||||
__runInitializers(_classThis, _classExtraInitializers);
|
||||
}
|
||||
};
|
||||
return C;
|
||||
})();
|
||||
export {};
|
||||
//// [b.js]
|
||||
export let C = (() => {
|
||||
let _classDecorators = [dec];
|
||||
let _classDescriptor;
|
||||
let _classExtraInitializers = [];
|
||||
let _classThis;
|
||||
var C = class {
|
||||
static {
|
||||
__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, _classExtraInitializers);
|
||||
C = _classThis = _classDescriptor.value;
|
||||
__runInitializers(_classThis, _classExtraInitializers);
|
||||
}
|
||||
};
|
||||
return C;
|
||||
})();
|
||||
//// [c.js]
|
||||
export default (() => {
|
||||
let _classDecorators = [dec];
|
||||
let _classDescriptor;
|
||||
let _classExtraInitializers = [];
|
||||
let _classThis;
|
||||
var default_1 = class {
|
||||
static {
|
||||
__setFunctionName(this, "default");
|
||||
__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, _classExtraInitializers);
|
||||
default_1 = _classThis = _classDescriptor.value;
|
||||
__runInitializers(_classThis, _classExtraInitializers);
|
||||
}
|
||||
};
|
||||
return default_1;
|
||||
})();
|
|
@ -1,57 +0,0 @@
|
|||
//// [findLast.ts]
|
||||
const itemNumber: number | undefined = [0].findLast((item) => item === 0);
|
||||
const itemString: string | undefined = ["string"].findLast((item) => item === "string");
|
||||
new Int8Array().findLast((item) => item === 0);
|
||||
new Uint8Array().findLast((item) => item === 0);
|
||||
new Uint8ClampedArray().findLast((item) => item === 0);
|
||||
new Int16Array().findLast((item) => item === 0);
|
||||
new Uint16Array().findLast((item) => item === 0);
|
||||
new Int32Array().findLast((item) => item === 0);
|
||||
new Uint32Array().findLast((item) => item === 0);
|
||||
new Float32Array().findLast((item) => item === 0);
|
||||
new Float64Array().findLast((item) => item === 0);
|
||||
new BigInt64Array().findLast((item) => item === BigInt(0));
|
||||
new BigUint64Array().findLast((item) => item === BigInt(0));
|
||||
|
||||
const indexNumber: number = [0].findLastIndex((item) => item === 0);
|
||||
const indexString: number = ["string"].findLastIndex((item) => item === "string");
|
||||
new Int8Array().findLastIndex((item) => item === 0);
|
||||
new Uint8Array().findLastIndex((item) => item === 0);
|
||||
new Uint8ClampedArray().findLastIndex((item) => item === 0);
|
||||
new Int16Array().findLastIndex((item) => item === 0);
|
||||
new Uint16Array().findLastIndex((item) => item === 0);
|
||||
new Int32Array().findLastIndex((item) => item === 0);
|
||||
new Uint32Array().findLastIndex((item) => item === 0);
|
||||
new Float32Array().findLastIndex((item) => item === 0);
|
||||
new Float64Array().findLastIndex((item) => item === 0);
|
||||
new BigInt64Array().findLastIndex((item) => item === BigInt(0));
|
||||
new BigUint64Array().findLastIndex((item) => item === BigInt(0));
|
||||
|
||||
|
||||
//// [findLast.js]
|
||||
const itemNumber = [0].findLast((item) => item === 0);
|
||||
const itemString = ["string"].findLast((item) => item === "string");
|
||||
new Int8Array().findLast((item) => item === 0);
|
||||
new Uint8Array().findLast((item) => item === 0);
|
||||
new Uint8ClampedArray().findLast((item) => item === 0);
|
||||
new Int16Array().findLast((item) => item === 0);
|
||||
new Uint16Array().findLast((item) => item === 0);
|
||||
new Int32Array().findLast((item) => item === 0);
|
||||
new Uint32Array().findLast((item) => item === 0);
|
||||
new Float32Array().findLast((item) => item === 0);
|
||||
new Float64Array().findLast((item) => item === 0);
|
||||
new BigInt64Array().findLast((item) => item === BigInt(0));
|
||||
new BigUint64Array().findLast((item) => item === BigInt(0));
|
||||
const indexNumber = [0].findLastIndex((item) => item === 0);
|
||||
const indexString = ["string"].findLastIndex((item) => item === "string");
|
||||
new Int8Array().findLastIndex((item) => item === 0);
|
||||
new Uint8Array().findLastIndex((item) => item === 0);
|
||||
new Uint8ClampedArray().findLastIndex((item) => item === 0);
|
||||
new Int16Array().findLastIndex((item) => item === 0);
|
||||
new Uint16Array().findLastIndex((item) => item === 0);
|
||||
new Int32Array().findLastIndex((item) => item === 0);
|
||||
new Uint32Array().findLastIndex((item) => item === 0);
|
||||
new Float32Array().findLastIndex((item) => item === 0);
|
||||
new Float64Array().findLastIndex((item) => item === 0);
|
||||
new BigInt64Array().findLastIndex((item) => item === BigInt(0));
|
||||
new BigUint64Array().findLastIndex((item) => item === BigInt(0));
|
|
@ -1,187 +0,0 @@
|
|||
=== tests/cases/compiler/findLast.ts ===
|
||||
const itemNumber: number | undefined = [0].findLast((item) => item === 0);
|
||||
>itemNumber : Symbol(itemNumber, Decl(findLast.ts, 0, 5))
|
||||
>[0].findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 0, 53))
|
||||
>item : Symbol(item, Decl(findLast.ts, 0, 53))
|
||||
|
||||
const itemString: string | undefined = ["string"].findLast((item) => item === "string");
|
||||
>itemString : Symbol(itemString, Decl(findLast.ts, 1, 5))
|
||||
>["string"].findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 1, 60))
|
||||
>item : Symbol(item, Decl(findLast.ts, 1, 60))
|
||||
|
||||
new Int8Array().findLast((item) => item === 0);
|
||||
>new Int8Array().findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 2, 26))
|
||||
>item : Symbol(item, Decl(findLast.ts, 2, 26))
|
||||
|
||||
new Uint8Array().findLast((item) => item === 0);
|
||||
>new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 3, 27))
|
||||
>item : Symbol(item, Decl(findLast.ts, 3, 27))
|
||||
|
||||
new Uint8ClampedArray().findLast((item) => item === 0);
|
||||
>new Uint8ClampedArray().findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 4, 34))
|
||||
>item : Symbol(item, Decl(findLast.ts, 4, 34))
|
||||
|
||||
new Int16Array().findLast((item) => item === 0);
|
||||
>new Int16Array().findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 5, 27))
|
||||
>item : Symbol(item, Decl(findLast.ts, 5, 27))
|
||||
|
||||
new Uint16Array().findLast((item) => item === 0);
|
||||
>new Uint16Array().findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 6, 28))
|
||||
>item : Symbol(item, Decl(findLast.ts, 6, 28))
|
||||
|
||||
new Int32Array().findLast((item) => item === 0);
|
||||
>new Int32Array().findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 7, 27))
|
||||
>item : Symbol(item, Decl(findLast.ts, 7, 27))
|
||||
|
||||
new Uint32Array().findLast((item) => item === 0);
|
||||
>new Uint32Array().findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 8, 28))
|
||||
>item : Symbol(item, Decl(findLast.ts, 8, 28))
|
||||
|
||||
new Float32Array().findLast((item) => item === 0);
|
||||
>new Float32Array().findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 9, 29))
|
||||
>item : Symbol(item, Decl(findLast.ts, 9, 29))
|
||||
|
||||
new Float64Array().findLast((item) => item === 0);
|
||||
>new Float64Array().findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 10, 29))
|
||||
>item : Symbol(item, Decl(findLast.ts, 10, 29))
|
||||
|
||||
new BigInt64Array().findLast((item) => item === BigInt(0));
|
||||
>new BigInt64Array().findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 11, 30))
|
||||
>item : Symbol(item, Decl(findLast.ts, 11, 30))
|
||||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --))
|
||||
|
||||
new BigUint64Array().findLast((item) => item === BigInt(0));
|
||||
>new BigUint64Array().findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 12, 31))
|
||||
>item : Symbol(item, Decl(findLast.ts, 12, 31))
|
||||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --))
|
||||
|
||||
const indexNumber: number = [0].findLastIndex((item) => item === 0);
|
||||
>indexNumber : Symbol(indexNumber, Decl(findLast.ts, 14, 5))
|
||||
>[0].findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 14, 47))
|
||||
>item : Symbol(item, Decl(findLast.ts, 14, 47))
|
||||
|
||||
const indexString: number = ["string"].findLastIndex((item) => item === "string");
|
||||
>indexString : Symbol(indexString, Decl(findLast.ts, 15, 5))
|
||||
>["string"].findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 15, 54))
|
||||
>item : Symbol(item, Decl(findLast.ts, 15, 54))
|
||||
|
||||
new Int8Array().findLastIndex((item) => item === 0);
|
||||
>new Int8Array().findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 16, 31))
|
||||
>item : Symbol(item, Decl(findLast.ts, 16, 31))
|
||||
|
||||
new Uint8Array().findLastIndex((item) => item === 0);
|
||||
>new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 17, 32))
|
||||
>item : Symbol(item, Decl(findLast.ts, 17, 32))
|
||||
|
||||
new Uint8ClampedArray().findLastIndex((item) => item === 0);
|
||||
>new Uint8ClampedArray().findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 18, 39))
|
||||
>item : Symbol(item, Decl(findLast.ts, 18, 39))
|
||||
|
||||
new Int16Array().findLastIndex((item) => item === 0);
|
||||
>new Int16Array().findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 19, 32))
|
||||
>item : Symbol(item, Decl(findLast.ts, 19, 32))
|
||||
|
||||
new Uint16Array().findLastIndex((item) => item === 0);
|
||||
>new Uint16Array().findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 20, 33))
|
||||
>item : Symbol(item, Decl(findLast.ts, 20, 33))
|
||||
|
||||
new Int32Array().findLastIndex((item) => item === 0);
|
||||
>new Int32Array().findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 21, 32))
|
||||
>item : Symbol(item, Decl(findLast.ts, 21, 32))
|
||||
|
||||
new Uint32Array().findLastIndex((item) => item === 0);
|
||||
>new Uint32Array().findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 22, 33))
|
||||
>item : Symbol(item, Decl(findLast.ts, 22, 33))
|
||||
|
||||
new Float32Array().findLastIndex((item) => item === 0);
|
||||
>new Float32Array().findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 23, 34))
|
||||
>item : Symbol(item, Decl(findLast.ts, 23, 34))
|
||||
|
||||
new Float64Array().findLastIndex((item) => item === 0);
|
||||
>new Float64Array().findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more)
|
||||
>findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 24, 34))
|
||||
>item : Symbol(item, Decl(findLast.ts, 24, 34))
|
||||
|
||||
new BigInt64Array().findLastIndex((item) => item === BigInt(0));
|
||||
>new BigInt64Array().findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 25, 35))
|
||||
>item : Symbol(item, Decl(findLast.ts, 25, 35))
|
||||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --))
|
||||
|
||||
new BigUint64Array().findLastIndex((item) => item === BigInt(0));
|
||||
>new BigUint64Array().findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
|
||||
>findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
|
||||
>item : Symbol(item, Decl(findLast.ts, 26, 36))
|
||||
>item : Symbol(item, Decl(findLast.ts, 26, 36))
|
||||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --))
|
||||
|
|
@ -1,325 +0,0 @@
|
|||
=== tests/cases/compiler/findLast.ts ===
|
||||
const itemNumber: number | undefined = [0].findLast((item) => item === 0);
|
||||
>itemNumber : number
|
||||
>[0].findLast((item) => item === 0) : number
|
||||
>[0].findLast : { <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }
|
||||
>[0] : number[]
|
||||
>0 : 0
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
const itemString: string | undefined = ["string"].findLast((item) => item === "string");
|
||||
>itemString : string
|
||||
>["string"].findLast((item) => item === "string") : string
|
||||
>["string"].findLast : { <S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string; }
|
||||
>["string"] : string[]
|
||||
>"string" : "string"
|
||||
>findLast : { <S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string; }
|
||||
>(item) => item === "string" : (item: string) => boolean
|
||||
>item : string
|
||||
>item === "string" : boolean
|
||||
>item : string
|
||||
>"string" : "string"
|
||||
|
||||
new Int8Array().findLast((item) => item === 0);
|
||||
>new Int8Array().findLast((item) => item === 0) : number
|
||||
>new Int8Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number; }
|
||||
>new Int8Array() : Int8Array
|
||||
>Int8Array : Int8ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint8Array().findLast((item) => item === 0);
|
||||
>new Uint8Array().findLast((item) => item === 0) : number
|
||||
>new Uint8Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number; }
|
||||
>new Uint8Array() : Uint8Array
|
||||
>Uint8Array : Uint8ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint8ClampedArray().findLast((item) => item === 0);
|
||||
>new Uint8ClampedArray().findLast((item) => item === 0) : number
|
||||
>new Uint8ClampedArray().findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number; }
|
||||
>new Uint8ClampedArray() : Uint8ClampedArray
|
||||
>Uint8ClampedArray : Uint8ClampedArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Int16Array().findLast((item) => item === 0);
|
||||
>new Int16Array().findLast((item) => item === 0) : number
|
||||
>new Int16Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number; }
|
||||
>new Int16Array() : Int16Array
|
||||
>Int16Array : Int16ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint16Array().findLast((item) => item === 0);
|
||||
>new Uint16Array().findLast((item) => item === 0) : number
|
||||
>new Uint16Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number; }
|
||||
>new Uint16Array() : Uint16Array
|
||||
>Uint16Array : Uint16ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Int32Array().findLast((item) => item === 0);
|
||||
>new Int32Array().findLast((item) => item === 0) : number
|
||||
>new Int32Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number; }
|
||||
>new Int32Array() : Int32Array
|
||||
>Int32Array : Int32ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint32Array().findLast((item) => item === 0);
|
||||
>new Uint32Array().findLast((item) => item === 0) : number
|
||||
>new Uint32Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number; }
|
||||
>new Uint32Array() : Uint32Array
|
||||
>Uint32Array : Uint32ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Float32Array().findLast((item) => item === 0);
|
||||
>new Float32Array().findLast((item) => item === 0) : number
|
||||
>new Float32Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number; }
|
||||
>new Float32Array() : Float32Array
|
||||
>Float32Array : Float32ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Float64Array().findLast((item) => item === 0);
|
||||
>new Float64Array().findLast((item) => item === 0) : number
|
||||
>new Float64Array().findLast : { <S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number; }
|
||||
>new Float64Array() : Float64Array
|
||||
>Float64Array : Float64ArrayConstructor
|
||||
>findLast : { <S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number; }
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new BigInt64Array().findLast((item) => item === BigInt(0));
|
||||
>new BigInt64Array().findLast((item) => item === BigInt(0)) : bigint
|
||||
>new BigInt64Array().findLast : { <S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S; (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint; }
|
||||
>new BigInt64Array() : BigInt64Array
|
||||
>BigInt64Array : BigInt64ArrayConstructor
|
||||
>findLast : { <S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S; (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint; }
|
||||
>(item) => item === BigInt(0) : (item: bigint) => boolean
|
||||
>item : bigint
|
||||
>item === BigInt(0) : boolean
|
||||
>item : bigint
|
||||
>BigInt(0) : bigint
|
||||
>BigInt : BigIntConstructor
|
||||
>0 : 0
|
||||
|
||||
new BigUint64Array().findLast((item) => item === BigInt(0));
|
||||
>new BigUint64Array().findLast((item) => item === BigInt(0)) : bigint
|
||||
>new BigUint64Array().findLast : { <S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S; (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint; }
|
||||
>new BigUint64Array() : BigUint64Array
|
||||
>BigUint64Array : BigUint64ArrayConstructor
|
||||
>findLast : { <S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S; (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint; }
|
||||
>(item) => item === BigInt(0) : (item: bigint) => boolean
|
||||
>item : bigint
|
||||
>item === BigInt(0) : boolean
|
||||
>item : bigint
|
||||
>BigInt(0) : bigint
|
||||
>BigInt : BigIntConstructor
|
||||
>0 : 0
|
||||
|
||||
const indexNumber: number = [0].findLastIndex((item) => item === 0);
|
||||
>indexNumber : number
|
||||
>[0].findLastIndex((item) => item === 0) : number
|
||||
>[0].findLastIndex : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number
|
||||
>[0] : number[]
|
||||
>0 : 0
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
const indexString: number = ["string"].findLastIndex((item) => item === "string");
|
||||
>indexString : number
|
||||
>["string"].findLastIndex((item) => item === "string") : number
|
||||
>["string"].findLastIndex : (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => number
|
||||
>["string"] : string[]
|
||||
>"string" : "string"
|
||||
>findLastIndex : (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => number
|
||||
>(item) => item === "string" : (item: string) => boolean
|
||||
>item : string
|
||||
>item === "string" : boolean
|
||||
>item : string
|
||||
>"string" : "string"
|
||||
|
||||
new Int8Array().findLastIndex((item) => item === 0);
|
||||
>new Int8Array().findLastIndex((item) => item === 0) : number
|
||||
>new Int8Array().findLastIndex : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => number
|
||||
>new Int8Array() : Int8Array
|
||||
>Int8Array : Int8ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint8Array().findLastIndex((item) => item === 0);
|
||||
>new Uint8Array().findLastIndex((item) => item === 0) : number
|
||||
>new Uint8Array().findLastIndex : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => number
|
||||
>new Uint8Array() : Uint8Array
|
||||
>Uint8Array : Uint8ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint8ClampedArray().findLastIndex((item) => item === 0);
|
||||
>new Uint8ClampedArray().findLastIndex((item) => item === 0) : number
|
||||
>new Uint8ClampedArray().findLastIndex : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => number
|
||||
>new Uint8ClampedArray() : Uint8ClampedArray
|
||||
>Uint8ClampedArray : Uint8ClampedArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Int16Array().findLastIndex((item) => item === 0);
|
||||
>new Int16Array().findLastIndex((item) => item === 0) : number
|
||||
>new Int16Array().findLastIndex : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => number
|
||||
>new Int16Array() : Int16Array
|
||||
>Int16Array : Int16ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint16Array().findLastIndex((item) => item === 0);
|
||||
>new Uint16Array().findLastIndex((item) => item === 0) : number
|
||||
>new Uint16Array().findLastIndex : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => number
|
||||
>new Uint16Array() : Uint16Array
|
||||
>Uint16Array : Uint16ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Int32Array().findLastIndex((item) => item === 0);
|
||||
>new Int32Array().findLastIndex((item) => item === 0) : number
|
||||
>new Int32Array().findLastIndex : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => number
|
||||
>new Int32Array() : Int32Array
|
||||
>Int32Array : Int32ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Uint32Array().findLastIndex((item) => item === 0);
|
||||
>new Uint32Array().findLastIndex((item) => item === 0) : number
|
||||
>new Uint32Array().findLastIndex : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => number
|
||||
>new Uint32Array() : Uint32Array
|
||||
>Uint32Array : Uint32ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Float32Array().findLastIndex((item) => item === 0);
|
||||
>new Float32Array().findLastIndex((item) => item === 0) : number
|
||||
>new Float32Array().findLastIndex : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => number
|
||||
>new Float32Array() : Float32Array
|
||||
>Float32Array : Float32ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new Float64Array().findLastIndex((item) => item === 0);
|
||||
>new Float64Array().findLastIndex((item) => item === 0) : number
|
||||
>new Float64Array().findLastIndex : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => number
|
||||
>new Float64Array() : Float64Array
|
||||
>Float64Array : Float64ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === 0 : (item: number) => boolean
|
||||
>item : number
|
||||
>item === 0 : boolean
|
||||
>item : number
|
||||
>0 : 0
|
||||
|
||||
new BigInt64Array().findLastIndex((item) => item === BigInt(0));
|
||||
>new BigInt64Array().findLastIndex((item) => item === BigInt(0)) : number
|
||||
>new BigInt64Array().findLastIndex : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => number
|
||||
>new BigInt64Array() : BigInt64Array
|
||||
>BigInt64Array : BigInt64ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === BigInt(0) : (item: bigint) => boolean
|
||||
>item : bigint
|
||||
>item === BigInt(0) : boolean
|
||||
>item : bigint
|
||||
>BigInt(0) : bigint
|
||||
>BigInt : BigIntConstructor
|
||||
>0 : 0
|
||||
|
||||
new BigUint64Array().findLastIndex((item) => item === BigInt(0));
|
||||
>new BigUint64Array().findLastIndex((item) => item === BigInt(0)) : number
|
||||
>new BigUint64Array().findLastIndex : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => number
|
||||
>new BigUint64Array() : BigUint64Array
|
||||
>BigUint64Array : BigUint64ArrayConstructor
|
||||
>findLastIndex : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => number
|
||||
>(item) => item === BigInt(0) : (item: bigint) => boolean
|
||||
>item : bigint
|
||||
>item === BigInt(0) : boolean
|
||||
>item : bigint
|
||||
>BigInt(0) : bigint
|
||||
>BigInt : BigIntConstructor
|
||||
>0 : 0
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
tests/cases/compiler/a.js(2,8): error TS2300: Duplicate identifier 'foo'.
|
||||
tests/cases/compiler/a.js(2,8): error TS8006: 'module' declarations can only be used in TypeScript files.
|
||||
tests/cases/compiler/a.js(3,5): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
tests/cases/compiler/a.js(7,5): error TS2300: Duplicate identifier 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/a.js (4 errors) ====
|
||||
//// [thisKeyword.ts]
|
||||
module foo {
|
||||
~~~
|
||||
!!! error TS2300: Duplicate identifier 'foo'.
|
||||
~~~
|
||||
!!! error TS8006: 'module' declarations can only be used in TypeScript files.
|
||||
this.bar = 4;
|
||||
~~~~
|
||||
!!! error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
}
|
||||
|
||||
//// [thisKeyword.js]
|
||||
var foo;
|
||||
~~~
|
||||
!!! error TS2300: Duplicate identifier 'foo'.
|
||||
(function (foo) {
|
||||
this.bar = 4;
|
||||
})(foo || (foo = {}));
|
|
@ -1,23 +0,0 @@
|
|||
//// [a.js]
|
||||
//// [thisKeyword.ts]
|
||||
module foo {
|
||||
this.bar = 4;
|
||||
}
|
||||
|
||||
//// [thisKeyword.js]
|
||||
var foo;
|
||||
(function (foo) {
|
||||
this.bar = 4;
|
||||
})(foo || (foo = {}));
|
||||
|
||||
//// [a.js]
|
||||
//// [thisKeyword.ts]
|
||||
var foo;
|
||||
(function (foo) {
|
||||
this.bar = 4;
|
||||
})(foo || (foo = {}));
|
||||
//// [thisKeyword.js]
|
||||
var foo;
|
||||
(function (foo) {
|
||||
this.bar = 4;
|
||||
})(foo || (foo = {}));
|
|
@ -1,24 +0,0 @@
|
|||
=== tests/cases/compiler/a.js ===
|
||||
//// [thisKeyword.ts]
|
||||
module foo {
|
||||
>foo : Symbol(foo, Decl(a.js, 0, 0))
|
||||
|
||||
this.bar = 4;
|
||||
}
|
||||
|
||||
//// [thisKeyword.js]
|
||||
var foo;
|
||||
>foo : Symbol(foo, Decl(a.js, 6, 3))
|
||||
|
||||
(function (foo) {
|
||||
>foo : Symbol(foo, Decl(a.js, 7, 11))
|
||||
|
||||
this.bar = 4;
|
||||
>this.bar : Symbol((Anonymous function).bar, Decl(a.js, 7, 17))
|
||||
>this : Symbol((Anonymous function), Decl(a.js, 7, 1))
|
||||
>bar : Symbol((Anonymous function).bar, Decl(a.js, 7, 17))
|
||||
|
||||
})(foo || (foo = {}));
|
||||
>foo : Symbol(foo, Decl(a.js, 0, 0))
|
||||
>foo : Symbol(foo, Decl(a.js, 0, 0))
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
=== tests/cases/compiler/a.js ===
|
||||
//// [thisKeyword.ts]
|
||||
module foo {
|
||||
>foo : typeof foo
|
||||
|
||||
this.bar = 4;
|
||||
>this.bar = 4 : 4
|
||||
>this.bar : any
|
||||
>this : any
|
||||
>bar : any
|
||||
>4 : 4
|
||||
}
|
||||
|
||||
//// [thisKeyword.js]
|
||||
var foo;
|
||||
>foo : any
|
||||
|
||||
(function (foo) {
|
||||
>(function (foo) { this.bar = 4;})(foo || (foo = {})) : void
|
||||
>(function (foo) { this.bar = 4;}) : typeof (Anonymous function)
|
||||
>function (foo) { this.bar = 4;} : typeof (Anonymous function)
|
||||
>foo : typeof globalThis.foo
|
||||
|
||||
this.bar = 4;
|
||||
>this.bar = 4 : 4
|
||||
>this.bar : any
|
||||
>this : this
|
||||
>bar : any
|
||||
>4 : 4
|
||||
|
||||
})(foo || (foo = {}));
|
||||
>foo || (foo = {}) : typeof foo
|
||||
>foo : typeof foo
|
||||
>(foo = {}) : {}
|
||||
>foo = {} : {}
|
||||
>foo : typeof foo
|
||||
>{} : {}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowImportingTsExtensions": true
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/b.ts(1,13): error TS1484: 'A' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
|
||||
/b.ts(5,10): error TS1205: Re-exporting a type when 'verbatimModuleSyntax' is enabled requires using 'export type'.
|
||||
/b.ts(6,10): error TS1205: Re-exporting a type when 'verbatimModuleSyntax' is enabled requires using 'export type'.
|
||||
/c.ts(1,10): error TS1485: 'AClass' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
|
||||
|
||||
|
||||
==== /a.ts (0 errors) ====
|
||||
export const a = 0;
|
||||
export type A = typeof a;
|
||||
export class AClass {}
|
||||
|
||||
==== /b.ts (3 errors) ====
|
||||
import { a, A, AClass } from "./a";
|
||||
~
|
||||
!!! error TS1484: 'A' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
|
||||
import type { a as aValue, A as AType } from "./a";
|
||||
import { type A as AType2 } from "./a";
|
||||
|
||||
export { A };
|
||||
~
|
||||
!!! error TS1205: Re-exporting a type when 'verbatimModuleSyntax' is enabled requires using 'export type'.
|
||||
export { A as A2 } from "./a";
|
||||
~~~~~~~
|
||||
!!! error TS1205: Re-exporting a type when 'verbatimModuleSyntax' is enabled requires using 'export type'.
|
||||
export type { A as A3 } from "./a";
|
||||
export { type A as A4 } from "./a";
|
||||
export type { AClass } from "./a";
|
||||
|
||||
==== /c.ts (1 errors) ====
|
||||
import { AClass } from "./b";
|
||||
~~~~~~
|
||||
!!! error TS1485: 'AClass' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
|
||||
!!! related TS1377 /b.ts:9:15: 'AClass' was exported here.
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxNoElision.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export const a = 0;
|
||||
export type A = typeof a;
|
||||
export class AClass {}
|
||||
|
||||
//// [b.ts]
|
||||
import { a, A, AClass } from "./a";
|
||||
import type { a as aValue, A as AType } from "./a";
|
||||
import { type A as AType2 } from "./a";
|
||||
|
||||
export { A };
|
||||
export { A as A2 } from "./a";
|
||||
export type { A as A3 } from "./a";
|
||||
export { type A as A4 } from "./a";
|
||||
export type { AClass } from "./a";
|
||||
|
||||
//// [c.ts]
|
||||
import { AClass } from "./b";
|
||||
|
||||
|
||||
//// [a.js]
|
||||
export var a = 0;
|
||||
var AClass = /** @class */ (function () {
|
||||
function AClass() {
|
||||
}
|
||||
return AClass;
|
||||
}());
|
||||
export { AClass };
|
||||
//// [b.js]
|
||||
import { a, A, AClass } from "./a";
|
||||
import {} from "./a";
|
||||
export { A };
|
||||
export { A as A2 } from "./a";
|
||||
export {} from "./a";
|
||||
//// [c.js]
|
||||
import { AClass } from "./b";
|
|
@ -1,49 +0,0 @@
|
|||
=== /a.ts ===
|
||||
export const a = 0;
|
||||
>a : Symbol(a, Decl(a.ts, 0, 12))
|
||||
|
||||
export type A = typeof a;
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>a : Symbol(a, Decl(a.ts, 0, 12))
|
||||
|
||||
export class AClass {}
|
||||
>AClass : Symbol(AClass, Decl(a.ts, 1, 25))
|
||||
|
||||
=== /b.ts ===
|
||||
import { a, A, AClass } from "./a";
|
||||
>a : Symbol(a, Decl(b.ts, 0, 8))
|
||||
>A : Symbol(A, Decl(b.ts, 0, 11))
|
||||
>AClass : Symbol(AClass, Decl(b.ts, 0, 14))
|
||||
|
||||
import type { a as aValue, A as AType } from "./a";
|
||||
>a : Symbol(a, Decl(a.ts, 0, 12))
|
||||
>aValue : Symbol(aValue, Decl(b.ts, 1, 13))
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>AType : Symbol(AType, Decl(b.ts, 1, 26))
|
||||
|
||||
import { type A as AType2 } from "./a";
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>AType2 : Symbol(AType2, Decl(b.ts, 2, 8))
|
||||
|
||||
export { A };
|
||||
>A : Symbol(A, Decl(b.ts, 4, 8))
|
||||
|
||||
export { A as A2 } from "./a";
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>A2 : Symbol(A2, Decl(b.ts, 5, 8))
|
||||
|
||||
export type { A as A3 } from "./a";
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>A3 : Symbol(A3, Decl(b.ts, 6, 13))
|
||||
|
||||
export { type A as A4 } from "./a";
|
||||
>A : Symbol(A, Decl(a.ts, 0, 19))
|
||||
>A4 : Symbol(A4, Decl(b.ts, 7, 8))
|
||||
|
||||
export type { AClass } from "./a";
|
||||
>AClass : Symbol(AClass, Decl(b.ts, 8, 13))
|
||||
|
||||
=== /c.ts ===
|
||||
import { AClass } from "./b";
|
||||
>AClass : Symbol(AClass, Decl(c.ts, 0, 8))
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
=== /a.ts ===
|
||||
export const a = 0;
|
||||
>a : 0
|
||||
>0 : 0
|
||||
|
||||
export type A = typeof a;
|
||||
>A : 0
|
||||
>a : 0
|
||||
|
||||
export class AClass {}
|
||||
>AClass : AClass
|
||||
|
||||
=== /b.ts ===
|
||||
import { a, A, AClass } from "./a";
|
||||
>a : 0
|
||||
>A : any
|
||||
>AClass : typeof AClass
|
||||
|
||||
import type { a as aValue, A as AType } from "./a";
|
||||
>a : 0
|
||||
>aValue : any
|
||||
>A : any
|
||||
>AType : 0
|
||||
|
||||
import { type A as AType2 } from "./a";
|
||||
>A : any
|
||||
>AType2 : any
|
||||
|
||||
export { A };
|
||||
>A : any
|
||||
|
||||
export { A as A2 } from "./a";
|
||||
>A : any
|
||||
>A2 : any
|
||||
|
||||
export type { A as A3 } from "./a";
|
||||
>A : any
|
||||
>A3 : 0
|
||||
|
||||
export { type A as A4 } from "./a";
|
||||
>A : any
|
||||
>A4 : any
|
||||
|
||||
export type { AClass } from "./a";
|
||||
>AClass : AClass
|
||||
|
||||
=== /c.ts ===
|
||||
import { AClass } from "./b";
|
||||
>AClass : typeof AClass
|
||||
|
Загрузка…
Ссылка в новой задаче