Extract function types from function and arrow expressions. (#60234)

This commit is contained in:
Titian Cernicova-Dragomir 2024-11-11 20:15:29 +02:00 коммит произвёл GitHub
Родитель ef802b1e4d
Коммит b58ac4abf2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
78 изменённых файлов: 489 добавлений и 385 удалений

Просмотреть файл

@ -6193,8 +6193,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
enterNewScope(context, node) {
if (isFunctionLike(node) || isJSDocSignature(node)) {
const signature = getSignatureFromDeclaration(node);
const expandedParams = getExpandedParameters(signature, /*skipUnionExpanding*/ true)[0];
return enterNewScope(context as NodeBuilderContext, node, expandedParams, signature.typeParameters);
return enterNewScope(context as NodeBuilderContext, node, signature.parameters, signature.typeParameters);
}
else {
const typeParameters = isConditionalTypeNode(node) ? getInferTypeParameters(node) :

Просмотреть файл

@ -969,14 +969,16 @@ export function createSyntacticTypeNodeBuilder(
return failed;
}
function typeFromFunctionLikeExpression(fnNode: FunctionExpression | ArrowFunction, context: SyntacticTypeNodeBuilderContext) {
// Disable any inference fallback since we won't actually use the resulting type and we don't want to generate errors
const oldNoInferenceFallback = context.noInferenceFallback;
context.noInferenceFallback = true;
createReturnFromSignature(fnNode, /*symbol*/ undefined, context);
reuseTypeParameters(fnNode.typeParameters, context);
fnNode.parameters.map(p => ensureParameter(p, context));
context.noInferenceFallback = oldNoInferenceFallback;
return notImplemented;
const returnType = createReturnFromSignature(fnNode, /*symbol*/ undefined, context);
const typeParameters = reuseTypeParameters(fnNode.typeParameters, context);
const parameters = fnNode.parameters.map(p => ensureParameter(p, context));
return syntacticResult(
factory.createFunctionTypeNode(
typeParameters,
parameters,
returnType,
),
);
}
function canGetTypeFromArrayLiteral(arrayLiteral: ArrayLiteralExpression, context: SyntacticTypeNodeBuilderContext, isConstContext: boolean) {
if (!isConstContext) {

Просмотреть файл

@ -245,15 +245,15 @@ class MyClass {
// Arrow function used in arrow function
var arrrr = () => (m: number) => () => (n: number) => m + n;
>arrrr : () => (m: number) => () => (n: number) => number
> : ^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^
>() => (m: number) => () => (n: number) => m + n : () => (m: number) => () => (n: number) => number
> : ^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^
>(m: number) => () => (n: number) => m + n : (m: number) => () => (n: number) => number
> : ^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^^^
>m : number
> : ^^^^^^
>() => (n: number) => m + n : () => (n: number) => number
> : ^^^^^^^ ^^ ^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>(n: number) => m + n : (n: number) => number
> : ^ ^^ ^^^^^^^^^^^
>n : number
@ -273,11 +273,11 @@ var e = arrrr()(3)()(4);
>arrrr()(3)() : (n: number) => number
> : ^ ^^ ^^^^^^^^^^^
>arrrr()(3) : () => (n: number) => number
> : ^^^^^^^ ^^ ^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>arrrr() : (m: number) => () => (n: number) => number
> : ^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^^^
>arrrr : () => (m: number) => () => (n: number) => number
> : ^^^^^^^ ^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^
>3 : 3
> : ^
>4 : 4
@ -294,9 +294,9 @@ function someFn() {
var arr = (n: number) => (p: number) => p * n;
>arr : (n: number) => (p: number) => number
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^
>(n: number) => (p: number) => p * n : (n: number) => (p: number) => number
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^
>n : number
> : ^^^^^^
>(p: number) => p * n : (p: number) => number
@ -320,7 +320,7 @@ function someFn() {
>arr(3) : (p: number) => number
> : ^ ^^ ^^^^^^^^^^^
>arr : (n: number) => (p: number) => number
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^
>3 : 3
> : ^
>4 : 4

Просмотреть файл

@ -32,7 +32,7 @@ function foo1(y = class {c = x}, x = 1) {
// ok - used in file
function foo2(y = function(x: typeof z) {}, z = 1) {
>foo2 : (y?: (x: typeof z) => void, z?: number) => void
> : ^ ^^^^ ^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
>y : (x: typeof z) => void
> : ^ ^^ ^^^^^^^^^
>function(x: typeof z) {} : (x: typeof z) => void

Просмотреть файл

@ -11,9 +11,9 @@ class Foo {
var lamda = (_super: number) => { // No Error
>lamda : (_super: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>(_super: number) => { // No Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>_super : number
> : ^^^^^^
@ -33,9 +33,9 @@ class Foo {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -64,9 +64,9 @@ class Foo2 extends Foo {
var lamda = (_super: number) => { // Error
>lamda : (_super: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>(_super: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_super: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>_super : number
> : ^^^^^^
@ -86,9 +86,9 @@ class Foo2 extends Foo {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -218,9 +218,9 @@ class Foo4 extends Foo {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this

Просмотреть файл

@ -26,7 +26,7 @@ class Foo {
function inner() {
>inner : () => (x: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
console.log(_this); // Error as this doesnt not resolve to user defined _this
>console.log(_this) : any

Просмотреть файл

@ -17,7 +17,7 @@ class Foo {
function inner(_this: number) { // Error
>inner : (_this: number) => (x: any) => any
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^
>_this : number
> : ^^^^^^
@ -34,9 +34,9 @@ class Foo {
var lamda = (_this: number) => { // Error
>lamda : (_this: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>(_this: number) => { // Error return x => this; // New scope. So should inject new _this capture } : (_this: number) => (x: any) => this
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>_this : number
> : ^^^^^^
@ -56,9 +56,9 @@ class Foo {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -257,9 +257,9 @@ class Foo3 {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this

Просмотреть файл

@ -11,9 +11,9 @@ class Foo2 {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -35,9 +35,9 @@ class Foo3 {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -66,9 +66,9 @@ class Foo4 {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this
@ -97,9 +97,9 @@ class Foo5 {
var lambda = () => {
>lambda : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
>() => { return x => this; // New scope. So should inject new _this capture } : () => (x: any) => this
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return x => this; // New scope. So should inject new _this capture
>x => this : (x: any) => this

Просмотреть файл

@ -111,9 +111,9 @@ b: number): void;
/** fooFunc
* comment
*/
declare var fooFunc: (b: string) => string;
declare var lambdaFoo: (a: number, b: number) => number;
declare var lambddaNoVarComment: (a: number, b: number) => number;
declare var fooFunc: (/** fooFunctionValue param */ b: string) => string;
declare var lambdaFoo: (/**param a*/ a: number, /**param b*/ b: number) => number;
declare var lambddaNoVarComment: (/**param a*/ a: number, /**param b*/ b: number) => number;
declare function blah(a: string): void;
declare function blah2(a: string): void;
declare function blah3(a: string): void;

Просмотреть файл

@ -18,11 +18,11 @@ var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S;
dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x));
>dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
> : ^ ^^ ^^ ^^ ^^^^^
><T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>f : (_: T) => S
> : ^ ^^ ^^^^^
>_ : T

Просмотреть файл

@ -16,11 +16,11 @@ var x: {
x = {
>x = { get foo() { return (n)=>n }, set foo(x) {}} : { foo: (n: any) => any; }
> : ^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^^^^^^^^ ^^^^^^^^^^^^^^
>x : { foo: (x: number) => number; }
> : ^^^^^^^ ^^^
>{ get foo() { return (n)=>n }, set foo(x) {}} : { foo: (n: any) => any; }
> : ^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^^^^^^^^ ^^^^^^^^^^^^^^
get foo() {
>foo : (n: any) => any

Просмотреть файл

@ -70,6 +70,6 @@ declare function b1(): typeof b1;
declare function foo(): typeof foo;
declare var foo1: typeof foo;
declare var foo2: typeof foo;
declare var foo3: () => /*elided*/ any;
declare var x: () => /*elided*/ any;
declare var foo3: () => () => /*elided*/ any;
declare var x: () => () => /*elided*/ any;
declare function foo5(x: number): (x: number) => number;

Просмотреть файл

@ -22,11 +22,11 @@ export type BoundedInteger<
export const toBoundedInteger =
>toBoundedInteger : <LowerBound extends number, UpperBound extends number>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger<LowerBound, UpperBound>
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
<LowerBound extends number, UpperBound extends number>(bounds: {
><LowerBound extends number, UpperBound extends number>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => ( n: number ): BoundedInteger<LowerBound, UpperBound> => // Implementation doesn't matter here ({} as any) : <LowerBound extends number, UpperBound extends number>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger<LowerBound, UpperBound>
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>bounds : { lowerBound: LowerBound; upperBound: UpperBound; }
> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^

Просмотреть файл

@ -169,7 +169,7 @@ function referencedInInferredType({ name: alias }: Named) {
function referencedInNestedFunction({ name: alias }: Named) {
>referencedInNestedFunction : ({ name: alias }: Named) => (p: typeof alias) => void
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^
>name : any
> : ^^^
>alias : string

Просмотреть файл

@ -11,7 +11,7 @@ export class C1 {
bar() {
>bar : () => (t: typeof C1) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return function (t: typeof C1) {
>function (t: typeof C1) { } : (t: typeof C1) => void
@ -34,7 +34,7 @@ export class C2 {
bar() {
>bar : () => (t: typeof C2) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return function (t: typeof C2) {
>function (t: typeof C2) { } : (t: typeof C2) => void
@ -60,7 +60,7 @@ export class C3 {
bar() {
>bar : () => (t: typeof C3) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return function (t: typeof C3) {
>function (t: typeof C3) { } : (t: typeof C3) => void
@ -84,7 +84,7 @@ export class C4 {
bar() {
>bar : () => (t: typeof C4) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return function (t: typeof C4) {
>function (t: typeof C4) { } : (t: typeof C4) => void

Просмотреть файл

@ -35,9 +35,9 @@ type Out = InexactOptionals<In>
const foo = <A = {}>() => (x: Out & A) => null
>foo : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^
><A = {}>() => (x: Out & A) => null : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^
>(x: Out & A) => null : (x: Out & A) => null
> : ^ ^^ ^^^^^^^^^
>x : { foo?: string | undefined; baz?: undefined; } & { bar: number; } & A
@ -49,5 +49,5 @@ export const baddts = foo()
>foo() : (x: { foo?: string | undefined; baz?: undefined; } & { bar: number; }) => null
> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^
>foo : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^

Просмотреть файл

@ -35,9 +35,9 @@ type Out = InexactOptionals<In>
const foo = <A = {}>() => (x: Out & A) => null
>foo : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^
><A = {}>() => (x: Out & A) => null : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^
>(x: Out & A) => null : (x: Out & A) => null
> : ^ ^^ ^^^^^^^^^
>x : { foo?: string | undefined; baz?: undefined; } & { bar: number; } & A
@ -49,5 +49,5 @@ export const baddts = foo()
>foo() : (x: { foo?: string | undefined; baz?: undefined; } & { bar: number; }) => null
> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^
>foo : <A = {}>() => (x: Out & A) => null
> : ^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^

Просмотреть файл

@ -79,9 +79,9 @@ import * as d from './decl'
export const f = {...d}
>f : { o1: (o: "value of b") => void; o2: (o: "value of a") => void; o3: (o: "value of a") => void; o4: (o: "b" | "notNecessary") => void; }
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>{...d} : { o1: (o: "value of b") => void; o2: (o: "value of a") => void; o3: (o: "value of a") => void; o4: (o: "b" | "notNecessary") => void; }
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>d : typeof d
> : ^^^^^^^^

Просмотреть файл

@ -1,23 +0,0 @@
v2.ts(2,14): error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
==== v1.ts (0 errors) ====
export const v1 = (...a: [n: "n", a: "a"]): {
/** r rest param */
a: typeof a,
} => {
return null!
}
==== v2.ts (1 errors) ====
const n = Symbol();
export const v2 = (...a: [n: "n", a: "a"]): {
~~
!!! error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
/** r rest param */
a: typeof a,
/** module var */
n: typeof n,
} => {
return null!
}

Просмотреть файл

@ -31,7 +31,16 @@ export const v2 = (...a) => {
//// [v1.d.ts]
export declare const v1: (n: "n", a: "a") => {
export declare const v1: (...a: [n: "n", a: "a"]) => {
/** r rest param */
a: [n: "n", a: "a"];
a: typeof a;
};
//// [v2.d.ts]
declare const n: unique symbol;
export declare const v2: (...a: [n: "n", a: "a"]) => {
/** r rest param */
a: typeof a;
/** module var */
n: typeof n;
};
export {};

Просмотреть файл

@ -3,7 +3,7 @@
=== a.ts ===
function decorator() {
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return (target: new (...args: any[]) => any) => {}
>(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@ -18,7 +18,7 @@ function decorator() {
>decorator() : (target: new (...args: any[]) => any) => void
> : ^ ^^ ^^^^^^^^^
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
class Foo {
>Foo : Foo

Просмотреть файл

@ -3,7 +3,7 @@
=== a.ts ===
function decorator() {
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return (target: new (...args: any[]) => any) => {}
>(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@ -19,7 +19,7 @@ try {
>decorator() : (target: new (...args: any[]) => any) => void
> : ^ ^^ ^^^^^^^^^
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
class Foo {
>Foo : Foo

Просмотреть файл

@ -3,7 +3,7 @@
=== a.ts ===
function decorator() {
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
return (target: new (...args: any[]) => any) => {}
>(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
@ -18,7 +18,7 @@ function decorator() {
>decorator() : (target: new (...args: any[]) => any) => void
> : ^ ^^ ^^^^^^^^^
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
class Foo {
>Foo : Foo
@ -50,7 +50,7 @@ try {
>decorator() : (target: new (...args: any[]) => any) => void
> : ^ ^^ ^^^^^^^^^
>decorator : () => (target: new (...args: any[]) => any) => void
> : ^^^^^^^ ^^ ^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^
class Foo {
>Foo : Foo

Просмотреть файл

@ -15,7 +15,7 @@ import { test } from './a';
function filter(handler: any) {
>filter : (handler: any) => (target: any, propertyKey: string) => void
> : ^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
>handler : any
return function (target: any, propertyKey: string) {
@ -37,7 +37,7 @@ class Wat {
>filter(() => test == 'abc') : (target: any, propertyKey: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>filter : (handler: any) => (target: any, propertyKey: string) => void
> : ^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
>() => test == 'abc' : () => boolean
> : ^^^^^^^^^^^^^
>test == 'abc' : boolean

Просмотреть файл

@ -79,7 +79,7 @@ function f6([f, ...f]) { }
function f7(a, func = (a) => { return 1 }) { } // not error
>f7 : (a: any, func?: (a: any) => number) => void
> : ^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
>a : any
> : ^^^
>func : (a: any) => number

Просмотреть файл

@ -83,7 +83,7 @@ function f6([f, ...f]) { }
function f7(a, func = (a) => { return 1 }){ } // not error
>f7 : (a: any, func?: (a: any) => number) => void
> : ^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
>a : any
> : ^^^
>func : (a: any) => number

Просмотреть файл

@ -8,9 +8,9 @@ function f(arguments) {
var a = () => (arguments) => arguments;
>a : () => (arguments: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>() => (arguments) => arguments : () => (arguments: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>(arguments) => arguments : (arguments: any) => any
> : ^ ^^^^^^^^^^^^^
>arguments : any

Просмотреть файл

@ -8,9 +8,9 @@ function f(arguments) {
var a = () => (arguments) => arguments;
>a : () => (arguments: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>() => (arguments) => arguments : () => (arguments: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
>(arguments) => arguments : (arguments: any) => any
> : ^ ^^^^^^^^^^^^^
>arguments : any

Просмотреть файл

@ -3,9 +3,9 @@
=== emitThisInObjectLiteralGetter.ts ===
const example = {
>example : { readonly foo: (item: any) => any; }
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
>{ get foo() { return item => this.bar(item); }} : { readonly foo: (item: any) => any; }
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
get foo() {
>foo : (item: any) => any

Просмотреть файл

@ -9,7 +9,7 @@ class C {
>boundMethodLogger("Yadda", /*bound*/ true) : (target: (this: C) => void, context: ClassMethodDecoratorContext<C, (this: C) => void>) => (this: C) => void
> : ^ ^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
>boundMethodLogger : <This, Args extends any[], Return>(source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => ((this: This, ...args: Args) => Return)
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^
>"Yadda" : "Yadda"
> : ^^^^^^^
>true : true
@ -53,7 +53,7 @@ export { C };
function boundMethodLogger<This, Args extends any[], Return>(source: string, bound = true) {
>boundMethodLogger : <This, Args extends any[], Return>(source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Return>) => ((this: This, ...args: Args) => Return)
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^
>source : string
> : ^^^^^^
>bound : boolean

Просмотреть файл

@ -623,7 +623,7 @@ false ? null : (...arg: number[]) => 68;
>a : any
> : ^^^
>(b)=>(c)=>81 : (b: any) => (c: any) => number
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^
>b : any
> : ^^^
>(c)=>81 : (c: any) => number
@ -633,7 +633,7 @@ false ? null : (...arg: number[]) => 68;
>81 : 81
> : ^^
>(c)=>(d)=>82 : (c: any) => (d: any) => number
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^
>c : any
> : ^^^
>(d)=>82 : (d: any) => number

Просмотреть файл

@ -16,7 +16,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -154,6 +154,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -218,7 +238,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -356,6 +376,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -420,7 +460,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -558,6 +598,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -622,7 +682,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -760,6 +820,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -824,7 +904,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -962,6 +1042,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -1026,7 +1126,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -1164,6 +1264,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"
@ -1228,7 +1348,7 @@
"containerKind": "",
"containerName": "",
"kind": "local function",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: ...) => void): void",
"name": "(local function) foo(a?: void, b?: () => (a?: void, b?: () => ...) => void): void",
"displayParts": [
{
"text": "(",
@ -1366,6 +1486,26 @@
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "...",
"kind": "text"

Просмотреть файл

@ -8,4 +8,4 @@ var x = function somefn() { return somefn; };
//// [functionExpressionReturningItself.d.ts]
declare var x: () => /*elided*/ any;
declare var x: () => () => /*elided*/ any;

Просмотреть файл

@ -3,7 +3,7 @@
=== generatorTypeCheck39.ts ===
function decorator(x: any) {
>decorator : (x: any) => (y: any) => void
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>x : any
> : ^^^
@ -21,7 +21,7 @@ function* g() {
>decorator(yield 0) : (y: any) => void
> : ^ ^^^^^^^^^^^^^^
>decorator : (x: any) => (y: any) => void
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^
>yield 0 : any
> : ^^^
>0 : 0

Просмотреть файл

@ -105,7 +105,7 @@ var r2 = f({ x: new Base(), y: new Derived2() }); // {}[]
function f2<T extends Base, U extends Base>(a: { x: T; y: U }) {
>f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^
>a : { x: T; y: U; }
> : ^^^^^ ^^^^^ ^^^
>x : T
@ -132,7 +132,7 @@ var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2
>f2({ x: new Derived(), y: new Derived2() }) : (x: Derived) => Derived2
> : ^ ^^^^^^^^^^^^^^^^^^^^^^
>f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^
>{ x: new Derived(), y: new Derived2() } : { x: Derived; y: Derived2; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : Derived
@ -168,7 +168,7 @@ var r4 = f2(i); // Base => Derived
>f2(i) : (x: Base) => Derived
> : ^ ^^^^^^^^^^^^^^^^^^
>f2 : <T extends Base, U extends Base>(a: { x: T; y: U; }) => (x: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^
>i : I<Base, Derived>
> : ^^^^^^^^^^^^^^^^

Просмотреть файл

@ -27,7 +27,7 @@ class D {
function foo<T, U extends T>(t: T, t2: U) {
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>t : T
> : ^
>t2 : U
@ -56,7 +56,7 @@ var r = foo(c, d);
>foo(c, d) : (x: C) => D
> : ^ ^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>c : C
> : ^
>d : D
@ -68,7 +68,7 @@ var r2 = foo(d, c); // error because C does not extend D
>foo(d, c) : (x: D) => D
> : ^ ^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>d : D
> : ^
>c : C
@ -80,7 +80,7 @@ var r3 = foo(c, { x: '', foo: c });
>foo(c, { x: '', foo: c }) : (x: C) => { x: string; foo: C; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>c : C
> : ^
>{ x: '', foo: c } : { x: string; foo: C; }
@ -100,7 +100,7 @@ var r4 = foo(null, null);
>foo(null, null) : (x: any) => any
> : ^ ^^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
var r5 = foo({}, null);
>r5 : (x: {}) => any
@ -108,7 +108,7 @@ var r5 = foo({}, null);
>foo({}, null) : (x: {}) => any
> : ^ ^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>{} : {}
> : ^^
@ -118,7 +118,7 @@ var r6 = foo(null, {});
>foo(null, {}) : (x: any) => {}
> : ^ ^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>{} : {}
> : ^^
@ -128,7 +128,7 @@ var r7 = foo({}, {});
>foo({}, {}) : (x: {}) => {}
> : ^ ^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>{} : {}
> : ^^
>{} : {}
@ -140,7 +140,7 @@ var r8 = foo(() => { }, () => { });
>foo(() => { }, () => { }) : (x: () => void) => () => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>() => { } : () => void
> : ^^^^^^^^^^
>() => { } : () => void
@ -152,7 +152,7 @@ var r9 = foo(() => { }, () => 1);
>foo(() => { }, () => 1) : (x: () => void) => () => number
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>() => { } : () => void
> : ^^^^^^^^^^
>() => 1 : () => number
@ -170,7 +170,7 @@ function other<T, U extends T>() {
>foo(c, d) : (x: C) => D
> : ^ ^^^^^^^^^
>foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>c : C
> : ^
>d : D
@ -182,7 +182,7 @@ function other<T, U extends T>() {
>foo<T, U>(c, d) : (x: T) => U
> : ^ ^^^^^^^^^
>foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>c : C
> : ^
>d : D

Просмотреть файл

@ -27,7 +27,7 @@ class D {
function foo<T, U extends T>(t: T, t2: U) {
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>t : T
> : ^
>t2 : U
@ -56,7 +56,7 @@ var r2 = foo(d, c); // the constraints are self-referencing, no downstream error
>foo(d, c) : (x: D) => D
> : ^ ^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>d : D
> : ^
>c : C
@ -68,7 +68,7 @@ var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no do
>foo(() => 1, () => { }) : (x: () => number) => () => number
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T, U extends T>(t: T, t2: U) => (x: T) => U
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>() => 1 : () => number
> : ^^^^^^^^^^^^
>1 : 1
@ -86,7 +86,7 @@ function other<T, U extends T>() {
>foo<T, U>(c, d) : (x: T) => U
> : ^ ^^^^^^^^^
>foo : <T_1, U_1 extends T_1>(t: T_1, t2: U_1) => (x: T_1) => U_1
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>c : C
> : ^
>d : D

Просмотреть файл

@ -17,9 +17,9 @@ interface Thenable<Value> {
const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>
>toThenable : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
><Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input): Thenable<Result> => { const result = fn(input) return { then<V>(onFulfilled: (value: Result) => V | Thenable<V>) { return toThenable<V, Result>(onFulfilled)(result as Result) } }; } : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>fn : (input: Input) => Result | Thenable<Result>
> : ^ ^^ ^^^^^
>input : Input
@ -59,7 +59,7 @@ const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Resul
>toThenable<V, Result>(onFulfilled) : (input: Result) => Thenable<V>
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^
>toThenable : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>onFulfilled : (value: Result) => V | Thenable<V>
> : ^ ^^ ^^^^^
>result as Result : Result
@ -72,9 +72,9 @@ const toThenable = <Result, Input>(fn: (input: Input) => Result | Thenable<Resul
const toThenableInferred = <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) =>
>toThenableInferred : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
><Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input): Thenable<Result> => { const result = fn(input) return { then(onFulfilled) { return toThenableInferred(onFulfilled)(result as Result) } }; } : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>fn : (input: Input) => Result | Thenable<Result>
> : ^ ^^ ^^^^^
>input : Input
@ -112,7 +112,7 @@ const toThenableInferred = <Result, Input>(fn: (input: Input) => Result | Thenab
>toThenableInferred(onFulfilled) : (input: Result) => Thenable<V>
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^
>toThenableInferred : <Result, Input>(fn: (input: Input) => Result | Thenable<Result>) => (input: Input) => Thenable<Result>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>onFulfilled : (value: Result) => V | Thenable<V>
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>result as Result : Result

Просмотреть файл

@ -235,9 +235,9 @@ const f13: <T>(x: Box<T[]>) => T = compose(unbox, unlist);
const arrayMap = <T, U>(f: (x: T) => U) => (a: T[]) => a.map(f);
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
><T, U>(f: (x: T) => U) => (a: T[]) => a.map(f) : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>f : (x: T) => U
> : ^ ^^ ^^^^^
>x : T
@ -259,9 +259,9 @@ const arrayMap = <T, U>(f: (x: T) => U) => (a: T[]) => a.map(f);
const arrayFilter = <T>(f: (x: T) => boolean) => (a: T[]) => a.filter(f);
>arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^
><T>(f: (x: T) => boolean) => (a: T[]) => a.filter(f) : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^
>f : (x: T) => boolean
> : ^ ^^ ^^^^^
>x : T
@ -289,7 +289,7 @@ const f20: (a: string[]) => number[] = arrayMap(x => x.length);
>arrayMap(x => x.length) : (a: string[]) => number[]
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>x => x.length : (x: string) => number
> : ^ ^^^^^^^^^^^^^^^^^^^
>x : string
@ -309,7 +309,7 @@ const f21: <A>(a: A[]) => A[][] = arrayMap(x => [x]);
>arrayMap(x => [x]) : (a: A[]) => A[][]
> : ^ ^^^^^^^^^^^^^^^
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>x => [x] : (x: A) => A[]
> : ^ ^^^^^^^^^^^
>x : A
@ -327,7 +327,7 @@ const f22: <A>(a: A[]) => A[] = arrayMap(identity);
>arrayMap(identity) : (a: A[]) => A[]
> : ^ ^^^^^^^^^^^^^
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>identity : <T>(x: T) => T
> : ^ ^^ ^^ ^^^^^
@ -339,7 +339,7 @@ const f23: <A>(a: A[]) => Box<A>[] = arrayMap(value => ({ value }));
>arrayMap(value => ({ value })) : (a: A[]) => { value: A; }[]
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^
>arrayMap : <T, U>(f: (x: T) => U) => (a: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>value => ({ value }) : (value: A) => { value: A; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^
>value : A
@ -359,7 +359,7 @@ const f30: (a: string[]) => string[] = arrayFilter(x => x.length > 10);
>arrayFilter(x => x.length > 10) : (a: string[]) => string[]
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
>arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^
>x => x.length > 10 : (x: string) => boolean
> : ^ ^^^^^^^^^^^^^^^^^^^^
>x : string
@ -383,7 +383,7 @@ const f31: <T extends Box<number>>(a: T[]) => T[] = arrayFilter(x => x.value > 1
>arrayFilter(x => x.value > 10) : (a: T[]) => T[]
> : ^ ^^^^^^^^^^^^^
>arrayFilter : <T>(f: (x: T) => boolean) => (a: T[]) => T[]
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^
>x => x.value > 10 : (x: T) => boolean
> : ^ ^^^^^^^^^^^^^^^
>x : T

Просмотреть файл

@ -874,7 +874,7 @@ declare class Bag<T> {
function asFunction<A extends any[], B>(cf: new (...args: A) => B) {
>asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>cf : new (...args: A) => B
> : ^^^^^^^^ ^^ ^^^^^
>args : A
@ -901,7 +901,7 @@ const newPoint = asFunction(Point);
>asFunction(Point) : (x: number, y: number) => Point
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>Point : typeof Point
> : ^^^^^^^^^^^^
@ -911,7 +911,7 @@ const newBag = asFunction(Bag);
>asFunction(Bag) : <T>(...args: T[]) => Bag<T>
> : ^ ^^^^^ ^^^^^^^^^^^^^^^^
>asFunction : <A extends any[], B>(cf: new (...args: A) => B) => (...args: A) => B
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>Bag : typeof Bag
> : ^^^^^^^^^^
@ -1197,9 +1197,9 @@ var actual = flip(zip);
const map = <T, U>(transform: (t: T) => U) =>
>map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
><T, U>(transform: (t: T) => U) => (arr: T[]) => arr.map(transform) : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>transform : (t: T) => U
> : ^ ^^ ^^^^^
>t : T
@ -1239,7 +1239,7 @@ const arr: string[] = map(identityStr)(['a']);
>map(identityStr) : (arr: string[]) => string[]
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
>map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>identityStr : (t: string) => string
> : ^ ^^ ^^^^^^^^^^^
>['a'] : string[]
@ -1255,7 +1255,7 @@ const arr1: string[] = map(identity)(['a']);
>map(identity) : <T>(arr: T[]) => T[]
> : ^ ^^ ^^^^^^^^^^^^^
>map : <T, U>(transform: (t: T) => U) => (arr: T[]) => U[]
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^
>identity : <T>(value: T) => T
> : ^ ^^ ^^ ^^^^^
>['a'] : string[]

Просмотреть файл

@ -867,7 +867,7 @@ let x32 = callr(sn, f16); // string | number
function bind<T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) {
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>f : (x: T, ...rest: U) => V
> : ^ ^^ ^^^^^ ^^ ^^^^^
>x : T
@ -910,7 +910,7 @@ const f21 = bind(f20, 42); // (y: string, z: boolean) => string[]
>bind(f20, 42) : (y: string, z: boolean) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>f20 : (x: number, y: string, z: boolean) => string[]
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>42 : 42
@ -922,7 +922,7 @@ const f22 = bind(f21, "hello"); // (z: boolean) => string[]
>bind(f21, "hello") : (z: boolean) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>f21 : (y: string, z: boolean) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"hello" : "hello"
@ -934,7 +934,7 @@ const f23 = bind(f22, true); // () => string[]
>bind(f22, true) : () => string[]
> : ^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>f22 : (z: boolean) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>true : true
@ -992,7 +992,7 @@ const g21 = bind(g20, 42); // (y: string, z: boolean) => string[]
>bind(g20, 42) : (y?: string | undefined, z?: boolean | undefined) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>g20 : (x: number, y?: string, z?: boolean) => string[]
> : ^ ^^ ^^ ^^^ ^^ ^^^ ^^^^^
>42 : 42
@ -1004,7 +1004,7 @@ const g22 = bind(g21, "hello"); // (z: boolean) => string[]
>bind(g21, "hello") : (z?: boolean | undefined) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>g21 : (y?: string | undefined, z?: boolean | undefined) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"hello" : "hello"
@ -1016,7 +1016,7 @@ const g23 = bind(g22, true); // () => string[]
>bind(g22, true) : () => string[]
> : ^^^^^^^^^^^^^^
>bind : <T, U extends unknown[], V>(f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^
>g22 : (z?: boolean | undefined) => string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>true : true

Просмотреть файл

@ -178,7 +178,7 @@ function curry1<A, B, C>(f: (a: A, b: B) => C): (ax: A) => (bx: B) => C {
return function (ay: A) {
>function (ay: A) { return function (by: B) { return f(ay, by); }; } : (ay: A) => (by: B) => C
> : ^ ^^ ^^^^^^ ^^ ^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^
>ay : A
> : ^

Просмотреть файл

@ -616,8 +616,8 @@ declare function assertAndPredicate(x: string | number | Date): x is string;
declare let snd: string | number | Date;
declare function isNumberWithThis(this: Date, x: number | string): x is number;
declare function narrowFromAny(x: any): x is number;
declare const noInferenceFromRest: (f_0: "a" | "b") => boolean;
declare const noInferenceFromImpossibleRest: () => boolean;
declare const noInferenceFromRest: (...f: ["a" | "b"]) => boolean;
declare const noInferenceFromImpossibleRest: (...f: []) => boolean;
declare function inferWithRest(x: string | null, ...f: ["a", "b"]): x is string;
declare const foobar: {
type: "foo";

Просмотреть файл

@ -657,7 +657,7 @@ type Test2 = EnsureIsString<42>; // never
function invoker <K extends string | number | symbol, A extends any[]> (key: K, ...args: A) {
>invoker : <K extends string | number | symbol, A extends any[]>(key: K, ...args: A) => <T extends Record<K, (...args: A) => any>>(obj: T) => ReturnType<T[K]>
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^ ^^^^^
>key : K
> : ^
>args : A
@ -692,7 +692,7 @@ const result = invoker('test', true)({ test: (a: boolean) => 123 })
>invoker('test', true) : <T extends Record<"test", (args_0: boolean) => any>>(obj: T) => ReturnType<T["test"]>
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>invoker : <K extends string | number | symbol, A extends any[]>(key: K, ...args: A) => <T extends Record<K, (...args: A) => any>>(obj: T) => ReturnType<T[K]>
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^ ^^^^^
>'test' : "test"
> : ^^^^^^
>true : true

Просмотреть файл

@ -3,9 +3,9 @@
=== instantiationExpressionErrorNoCrash.ts ===
const createCacheReducer = <N extends string, QR>(
>createCacheReducer : <N extends string, QR>(queries: Cache<N, QR>["queries"]) => (state?: { queries: QR; }) => { queries: QR; }
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><N extends string, QR>( queries: Cache<N, QR>["queries"],) => { const queriesMap = {} as QR; const initialState = { queries: queriesMap, }; return (state = initialState) => state;} : <N extends string, QR>(queries: Cache<N, QR>["queries"]) => (state?: { queries: QR; }) => { queries: QR; }
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
queries: Cache<N, QR>["queries"],
>queries : { [QK in keyof QR]: any; }
@ -56,7 +56,7 @@ export type Cache<N extends string, QR> = {
[QK in keyof QR]: ReturnType<typeof createCacheReducer<QR>>;
>createCacheReducer : <N_1 extends string, QR_1>(queries: Cache<N_1, QR_1>["queries"]) => (state?: { queries: QR_1; }) => { queries: QR_1; }
> : ^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
};
};

Просмотреть файл

@ -31,9 +31,9 @@ const parameterFn = (props:{store:string}) => alert(props.store)
const brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o
>brokenFunction : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^
><OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^
>f : (p: { dispatch: number; } & OwnProps) => void
> : ^ ^^ ^^^^^
>p : { dispatch: number; } & OwnProps
@ -55,7 +55,7 @@ export const Form3 = brokenFunction(parameterFn)({store: "hello"})
>brokenFunction(parameterFn) : (o: { store: string; }) => { store: string; }
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^
>brokenFunction : <OwnProps>(f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps
> : ^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^
>parameterFn : (props: { store: string; }) => void
> : ^ ^^ ^^^^^^^^^
>{store: "hello"} : { store: string; }

Просмотреть файл

@ -817,7 +817,7 @@ interface Opts<TParams, TDone, TMapped> {
function example<TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) {
>example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^
>options : Opts<TParams, TDone, TMapped>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -871,7 +871,7 @@ example({
>example({ fetch: (params: Params) => 123, map: (number) => String(number)}) : (params: Params) => string
> : ^ ^^^^^^^^^^^^^^^^^^^
>example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^
>{ fetch: (params: Params) => 123, map: (number) => String(number)} : { fetch: (params: Params) => number; map: (number: number) => string; }
> : ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
@ -905,7 +905,7 @@ example({
>example({ fetch: (params: Params, foo: number) => 123, map: (number) => String(number)}) : (params: Params) => string
> : ^ ^^^^^^^^^^^^^^^^^^^
>example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^
>{ fetch: (params: Params, foo: number) => 123, map: (number) => String(number)} : { fetch: (params: Params, foo: number) => number; map: (number: number) => string; }
> : ^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
@ -941,7 +941,7 @@ example({
>example({ fetch: (params: Params, foo) => 123, map: (number) => String(number)}) : (params: Params) => string
> : ^ ^^^^^^^^^^^^^^^^^^^
>example : <TParams, TDone, TMapped>(options: Opts<TParams, TDone, TMapped>) => (params: TParams) => TMapped
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^
>{ fetch: (params: Params, foo) => 123, map: (number) => String(number)} : { fetch: (params: Params, foo: number) => number; map: (number: number) => string; }
> : ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^

Просмотреть файл

@ -45,7 +45,7 @@ export class Bar {
=== file2.ts ===
export function foo(p = (ip = 10, v: number): void => {}): void{
>foo : (p?: (ip: number | undefined, v: number) => void) => void
> : ^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^
> : ^ ^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^
>p : (ip: number | undefined, v: number) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^
>(ip = 10, v: number): void => {} : (ip: number | undefined, v: number) => void
@ -63,7 +63,7 @@ type T = number
export function foo2(p = (ip = 10 as T, v: number): void => {}): void{}
>foo2 : (p?: (ip: T | undefined, v: number) => void) => void
> : ^ ^^^^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^
> : ^ ^^^^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^
>p : (ip: T | undefined, v: number) => void
> : ^ ^^ ^^^^^^^^^^^^^^ ^^ ^^^^^
>(ip = 10 as T, v: number): void => {} : (ip: T | undefined, v: number) => void

Просмотреть файл

@ -3,7 +3,7 @@
=== jsdocSignatureOnReturnedFunction.js ===
function f1() {
>f1 : () => (a: number, b: number) => number
> : ^^^^^^^ ^^ ^^ ^^ ^^^^^
> : ^^^^^^^ ^^ ^^^^^
/**
* @param {number} a
@ -30,7 +30,7 @@ function f1() {
function f2() {
>f2 : () => (a: number, b: number) => number
> : ^^^^^^^ ^^ ^^ ^^ ^^^^^
> : ^^^^^^^ ^^ ^^^^^
/**
* @param {number} a

Просмотреть файл

@ -2429,9 +2429,9 @@ function f1(thing: Thing) {
const assignTo2 = <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) =>
>assignTo2 : <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]
> : ^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
><T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => object[key1][key2] = value : <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2]
> : ^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
>object : T
> : ^
>key1 : K1

Просмотреть файл

@ -567,7 +567,7 @@ namespace Foo {
function f10() {
>f10 : () => (k: number) => boolean
> : ^^^^^^^ ^^ ^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
let i: number | undefined;
>i : number | undefined
@ -600,7 +600,7 @@ function f10() {
function makeAdder(n?: number) {
>makeAdder : (n?: number) => (m: number) => number
> : ^ ^^^ ^^^^^^ ^^ ^^^^^^^^^^^
> : ^ ^^^ ^^^^^^ ^^^^^^^^^^^
>n : number | undefined
> : ^^^^^^^^^^^^^^^^^^

Просмотреть файл

@ -10,9 +10,9 @@ void (r =>(r => r));
>void (r =>(r => r)) : undefined
> : ^^^^^^^^^
>(r =>(r => r)) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r =>(r => r) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r : any
>(r => r) : (r: any) => any
> : ^ ^^^^^^^^^^^^^
@ -42,9 +42,9 @@ void(r =>(r => r));
>void(r =>(r => r)) : undefined
> : ^^^^^^^^^
>(r =>(r => r)) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r =>(r => r) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r : any
>(r => r) : (r: any) => any
> : ^ ^^^^^^^^^^^^^
@ -55,11 +55,11 @@ void(r =>(r => r));
[(r =>(r => r))]
>[(r =>(r => r))] : ((r: any) => (r: any) => any)[]
> : ^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
> : ^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^
>(r =>(r => r)) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r =>(r => r) : (r: any) => (r: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^
>r : any
>(r => r) : (r: any) => any
> : ^ ^^^^^^^^^^^^^

Просмотреть файл

@ -28,7 +28,7 @@ function f1 (bar = foo) { // unexpected compiler error; works at runtime
function f2 (bar = (baz = foo) => baz) { // unexpected compiler error; works at runtime
>f2 : (bar?: (baz?: number) => number) => number
> : ^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bar : (baz?: number) => number
> : ^ ^^^^^^^^^^^^^^^^^^^^
>(baz = foo) => baz : (baz?: number) => number

Просмотреть файл

@ -28,7 +28,7 @@ function f1 (bar = foo) { // unexpected compiler error; works at runtime
function f2 (bar = (baz = foo) => baz) { // unexpected compiler error; works at runtime
>f2 : (bar?: (baz?: string) => string) => string
> : ^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bar : (baz?: string) => string
> : ^ ^^^^^^^^^^^^^^^^^^^^
>(baz = foo) => baz : (baz?: string) => string

Просмотреть файл

@ -3,7 +3,7 @@
=== parameterReferenceInInitializer2.ts ===
function Example(x = function(x: any) { return x; }) { // Error: parameter 'x' cannot be
>Example : (x?: (x: any) => any) => void
> : ^ ^^^^ ^^ ^^^^^^^^^^^^^^^^^
> : ^ ^^^^ ^^^^^^^^^^^^^^^^^
>x : (x: any) => any
> : ^ ^^ ^^^^^^^^
>function(x: any) { return x; } : (x: any) => any

Просмотреть файл

@ -20,9 +20,9 @@ type F2 = (n: number): string; // should be => not :
// doesn't work in non-type contexts, where the return type is optional
let f = (n: number) => string => n.toString();
>f : (n: number) => (string: any) => string
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
>(n: number) => string => n.toString() : (n: number) => (string: any) => string
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^^^^^^
>n : number
> : ^^^^^^
>string => n.toString() : (string: any) => string

Просмотреть файл

@ -280,9 +280,9 @@ const simpleAction = (payload: boolean) => ({
});
const thunkAction = (param1: number, param2: string) => async (
>thunkAction : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
>(param1: number, param2: string) => async ( dispatch: Dispatch, { foo }: OwnProps) => { return foo;} : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
>param1 : number
> : ^^^^^^
>param2 : string
@ -332,13 +332,13 @@ class TestComponent extends Component<TestComponentProps> {}
const mapDispatchToProps = { simpleAction, thunkAction };
>mapDispatchToProps : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
>{ simpleAction, thunkAction } : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
>simpleAction : (payload: boolean) => { type: string; payload: boolean; }
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>thunkAction : (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
type Q = HandleThunkActionCreator<typeof simpleAction>;
>Q : (payload: boolean) => { type: string; payload: boolean; }
@ -359,7 +359,7 @@ const Test1 = connect(
null,
mapDispatchToProps
>mapDispatchToProps : { simpleAction: (payload: boolean) => { type: string; payload: boolean; }; thunkAction: (param1: number, param2: string) => (dispatch: Dispatch, { foo }: OwnProps) => Promise<string>; }
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^
)(TestComponent);
>TestComponent : typeof TestComponent

Просмотреть файл

@ -3,7 +3,7 @@
=== returnStatement1.ts ===
function f() {
>f : () => (s: any) => void
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return function (s) {
>function (s) { var x = s; } : (s: any) => void

Просмотреть файл

@ -128,9 +128,9 @@ const inferredParams2 = createMachine({
const checkType = <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value;
>checkType : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>value : { [K in keyof U & keyof T]: U[K]; }
@ -146,7 +146,7 @@ const checked = checkType<{x: number, y: string}>()({
>checkType<{x: number, y: string}>() : <U extends { x: number; y: string; }>(value: { [K in keyof U & ("x" | "y")]: U[K]; }) => { [K in keyof U & ("x" | "y")]: U[K]; }
> : ^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>checkType : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : number
> : ^^^^^^
>y : string

Просмотреть файл

@ -33,9 +33,9 @@ foo_({x: 1, y: 'foo'});
const checkType_ = <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value;
>checkType_ : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><U extends T>(value: { [K in keyof U & keyof T]: U[K] }) => value : <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>value : { [K in keyof U & keyof T]: U[K]; }
@ -51,7 +51,7 @@ const checked_ = checkType_<{x: number, y: string}>()({
>checkType_<{x: number, y: string}>() : <U extends { x: number; y: string; }>(value: { [K in keyof U & ("x" | "y")]: U[K]; }) => { [K in keyof U & ("x" | "y")]: U[K]; }
> : ^ ^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>checkType_ : <T>() => <U extends T>(value: { [K in keyof U & keyof T]: U[K]; }) => { [K in keyof U & keyof T]: U[K]; }
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : number
> : ^^^^^^
>y : string

Просмотреть файл

@ -5,7 +5,7 @@ function f1() {
type A = [s: string];
type C = [...A, ...A];
return function fn(...args: C) { }
return function fn(...args: C) { } satisfies any
}
function f2() {
@ -14,7 +14,7 @@ function f2() {
type C = [c: string];
type D = [...A, ...A, ...B, ...A, ...B, ...B, ...A, ...C];
return function fn(...args: D) { }
return function fn(...args: D) { } satisfies any;
}

Просмотреть файл

@ -12,7 +12,7 @@ function f1() {
>A : Symbol(A, Decl(spreadParameterTupleType.ts, 0, 15))
>A : Symbol(A, Decl(spreadParameterTupleType.ts, 0, 15))
return function fn(...args: C) { }
return function fn(...args: C) { } satisfies any
>fn : Symbol(fn, Decl(spreadParameterTupleType.ts, 4, 10))
>args : Symbol(args, Decl(spreadParameterTupleType.ts, 4, 23))
>C : Symbol(C, Decl(spreadParameterTupleType.ts, 1, 25))
@ -41,7 +41,7 @@ function f2() {
>A : Symbol(A, Decl(spreadParameterTupleType.ts, 7, 15))
>C : Symbol(C, Decl(spreadParameterTupleType.ts, 9, 25))
return function fn(...args: D) { }
return function fn(...args: D) { } satisfies any;
>fn : Symbol(fn, Decl(spreadParameterTupleType.ts, 13, 10))
>args : Symbol(args, Decl(spreadParameterTupleType.ts, 13, 23))
>D : Symbol(D, Decl(spreadParameterTupleType.ts, 10, 25))

Просмотреть файл

@ -13,7 +13,9 @@ function f1() {
>C : [s: string, s: string]
> : ^^^^^^^^^^^^^^^^^^^^^^
return function fn(...args: C) { }
return function fn(...args: C) { } satisfies any
>function fn(...args: C) { } satisfies any : (s: string, s_1: string) => void
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>function fn(...args: C) { } : (s: string, s_1: string) => void
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>fn : (s: string, s_1: string) => void
@ -42,7 +44,9 @@ function f2() {
>D : [a: string, a: string, b: string, a: string, b: string, b: string, a: string, c: string]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return function fn(...args: D) { }
return function fn(...args: D) { } satisfies any;
>function fn(...args: D) { } satisfies any : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>function fn(...args: D) { } : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>fn : (a: string, a_1: string, b: string, a_2: string, b_1: string, b_2: string, a_3: string, c: string) => void

Просмотреть файл

@ -719,9 +719,9 @@ var r6b = [r6arg2, r6arg1];
var r7arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => <U>null;
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
><T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: T) => U
> : ^ ^^ ^^^^^
>arg : T
@ -735,9 +735,9 @@ var r7arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) =>
var r7arg2 = (x: (arg: Base) => Derived) => (r: Base) => <Derived>null;
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>(x: (arg: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>x : (arg: Base) => Derived
> : ^ ^^ ^^^^^
>arg : Base
@ -757,33 +757,33 @@ var r7 = foo7(r7arg1); // any
>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
var r7a = [r7arg1, r7arg2];
>r7a : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r7arg1, r7arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
var r7b = [r7arg2, r7arg1];
>r7b : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r7arg2, r7arg1] : ((x: (arg: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
var r8arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => <U>null;
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: T) => U
> : ^ ^^ ^^^^^
>arg : T
@ -801,9 +801,9 @@ var r8arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T)
var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: Base) => Derived
> : ^ ^^ ^^^^^
>arg : Base
@ -827,33 +827,33 @@ var r8 = foo8(r8arg1); // any
>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r8a = [r8arg1, r8arg2];
>r8a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r8arg1, r8arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r8b = [r8arg2, r8arg1];
>r8b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r8arg2, r8arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r9arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => <U>null;
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: T) => U
> : ^ ^^ ^^^^^
>arg : T
@ -875,9 +875,9 @@ var r9arg1 = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { f
var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: Base) => Derived
> : ^ ^^ ^^^^^
>arg : Base
@ -901,27 +901,27 @@ var r9 = foo9(r9arg1); // any
>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; (a: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r9a = [r9arg1, r9arg2];
>r9a : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r9arg1, r9arg2] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r9b = [r9arg2, r9arg1];
>r9b : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r9arg2, r9arg1] : ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived)[]
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r10arg1 = <T extends Derived>(...x: T[]) => x[0];
>r10arg1 : <T extends Derived>(...x: T[]) => T

Просмотреть файл

@ -308,9 +308,9 @@ module Errors {
var r2arg = <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => <V>null;
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
><T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => <V>null : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: T) => U
> : ^ ^^ ^^^^^
>arg : T
@ -324,9 +324,9 @@ module Errors {
var r2arg2 = (x: (arg: Base) => Derived) => (r: Base) => <Derived2>null;
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>(x: (arg: Base) => Derived) => (r: Base) => <Derived2>null : (x: (arg: Base) => Derived) => (r: Base) => Derived2
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>x : (arg: Base) => Derived
> : ^ ^^ ^^^^^
>arg : Base
@ -346,33 +346,33 @@ module Errors {
>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): typeof a2; (a2: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
var r2a = [r2arg2, r2arg];
>r2a : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r2arg2, r2arg] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
var r2b = [r2arg, r2arg2];
>r2b : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>[r2arg, r2arg2] : ((x: (arg: Base) => Derived) => (r: Base) => Derived2)[]
> : ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^
> : ^^ ^^ ^^^^^^ ^^^^^ ^^^
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
> : ^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^^^^^ ^^^^^
var r3arg = <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => <U>null;
>r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
><T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => <U>null : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: T) => U
> : ^ ^^ ^^^^^
>arg : T
@ -392,9 +392,9 @@ module Errors {
var r3arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null;
>r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => <Derived>null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>x : (arg: Base) => Derived
> : ^ ^^ ^^^^^
>arg : Base
@ -416,27 +416,27 @@ module Errors {
>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a2; (a2: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r3a = [r3arg2, r3arg];
>r3a : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^
>[r3arg2, r3arg] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^
>r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r3b = [r3arg, r3arg2];
>r3b : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^
>[r3arg, r3arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^ ^^^^
> : ^^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^^^ ^^ ^^ ^^ ^^^^^^ ^^^^^ ^^^^
>r3arg : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^^^^
>r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
> : ^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^ ^^ ^^ ^^^^^^ ^^^^^
var r4arg = <T extends Derived>(...x: T[]) => <T>null;
>r4arg : <T extends Derived>(...x: T[]) => T

Просмотреть файл

@ -5,9 +5,9 @@
const f = _ => (..._) => "";
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>_ => (..._) => "" : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>_ : any
>(..._) => "" : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
@ -22,7 +22,7 @@ f({ ...{ x: 0 } })``;
>f({ ...{ x: 0 } }) : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>{ ...{ x: 0 } } : { x: number; }
> : ^^^^^^^^^^^^^^
>{ x: 0 } : { x: number; }
@ -40,7 +40,7 @@ f({ ...{ x: 0 } })`x`;
>f({ ...{ x: 0 } }) : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>{ ...{ x: 0 } } : { x: number; }
> : ^^^^^^^^^^^^^^
>{ x: 0 } : { x: number; }
@ -58,7 +58,7 @@ f({ ...{ x: 0 } })`x${f}x`;
>f({ ...{ x: 0 } }) : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>{ ...{ x: 0 } } : { x: number; }
> : ^^^^^^^^^^^^^^
>{ x: 0 } : { x: number; }
@ -70,7 +70,7 @@ f({ ...{ x: 0 } })`x${f}x`;
>`x${f}x` : string
> : ^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
f({ ...{ x: 0 }, y: (() => 1)() })``;
>f({ ...{ x: 0 }, y: (() => 1)() })`` : string
@ -78,7 +78,7 @@ f({ ...{ x: 0 }, y: (() => 1)() })``;
>f({ ...{ x: 0 }, y: (() => 1)() }) : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>{ ...{ x: 0 }, y: (() => 1)() } : { y: number; x: number; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>{ x: 0 } : { x: number; }
@ -106,7 +106,7 @@ f({ x: (() => 1)(), ...{ y: 1 } })``;
>f({ x: (() => 1)(), ...{ y: 1 } }) : (..._: any[]) => string
> : ^^^^ ^^^^^^^^^^^^^^^^^^
>f : (_: any) => (..._: any[]) => string
> : ^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>{ x: (() => 1)(), ...{ y: 1 } } : { y: number; x: number; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>x : number

Просмотреть файл

@ -9,9 +9,9 @@ Instantiation count: 2,500
const createScopedActionType = <S extends string>(scope: S) => <T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}`;
>createScopedActionType : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
><S extends string>(scope: S) => <T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}` : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>scope : S
> : ^
><T extends string>(type: T) => `${scope}/${type}` as `${S}/${T}` : <T extends string>(type: T) => `${S}/${T}`
@ -33,7 +33,7 @@ const createActionInMyScope = createScopedActionType("MyScope"); // <T extends
>createScopedActionType("MyScope") : <T extends string>(type: T) => `MyScope/${T}`
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^
>createScopedActionType : <S extends string>(scope: S) => <T extends string>(type: T) => `${S}/${T}`
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>"MyScope" : "MyScope"
> : ^^^^^^^^^

Просмотреть файл

@ -3,7 +3,7 @@
=== thisExpressionInIndexExpression.ts ===
function f() {
>f : () => (r: any) => any
> : ^^^^^^^ ^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^
return r => r[this];
>r => r[this] : (r: any) => any

Просмотреть файл

@ -132,9 +132,9 @@ class C5 {
let f3 = (x: this) => (y: this) => this;
>f3 : (x: this) => (y: this) => this
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^
>(x: this) => (y: this) => this : (x: this) => (y: this) => this
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^^^^^ ^^^^^^^^^
>x : this
> : ^^^^
>(y: this) => this : (y: this) => this

Просмотреть файл

@ -1019,11 +1019,11 @@ import * as ast from "./ast";
export const isNodeOfType =
>isNodeOfType : <NodeType extends ast.SyntaxKind>(nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract<ast.Node, { kind: NodeType; }>
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
<NodeType extends ast.SyntaxKind>(nodeType: NodeType) =>
><NodeType extends ast.SyntaxKind>(nodeType: NodeType) => ( node: ast.Node | null | undefined, ): node is Extract<ast.Node, { kind: NodeType }> => node?.kind === nodeType : <NodeType extends ast.SyntaxKind>(nodeType: NodeType) => (node: ast.Node | null | undefined) => node is Extract<ast.Node, { kind: NodeType; }>
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^^^^
>ast : any
> : ^^^
>nodeType : NodeType

Просмотреть файл

@ -16,62 +16,35 @@ export const v2 = (...a: [n: "n", a: "a"]): {
return null!
}
//// [v1.d.ts] ////
export declare const v1: (n: "n", a: "a") => {
export declare const v1: (...a: [n: "n", a: "a"]) => {
/** r rest param */
a: [n: "n", a: "a"];
a: typeof a;
};
//// [Diagnostics reported]
v1.ts(3,15): error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
==== v1.ts (1 errors) ====
export const v1 = (...a: [n: "n", a: "a"]): {
/** r rest param */
a: typeof a,
~
!!! error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
!!! related TS9027 v1.ts:1:14: Add a type annotation to the variable v1.
} => {
return null!
}
//// [v2.d.ts] ////
export declare const v2: (n: "n", a: "a") => {
declare const n: unique symbol;
export declare const v2: (...a: [n: "n", a: "a"]) => {
/** r rest param */
a: [n: "n", a: "a"];
a: typeof a;
/** module var */
n: unique symbol;
n: typeof n;
};
export {};
//// [Diagnostics reported]
v2.ts(2,14): error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
v2.ts(4,15): error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
v2.ts(6,5): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
v2.ts(6,15): error TS9039: Type containing private name 'n' can't be used with --isolatedDeclarations.
v2.ts(1,7): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations.
==== v2.ts (4 errors) ====
==== v2.ts (1 errors) ====
const n = Symbol();
~
!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations.
!!! related TS9027 v2.ts:1:7: Add a type annotation to the variable n.
export const v2 = (...a: [n: "n", a: "a"]): {
~~
!!! error TS2527: The inferred type of 'v2' references an inaccessible 'unique symbol' type. A type annotation is necessary.
/** r rest param */
a: typeof a,
~
!!! error TS9039: Type containing private name 'a' can't be used with --isolatedDeclarations.
!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
/** module var */
n: typeof n,
~
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
!!! related TS9035 v2.ts:6:5: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.
~
!!! error TS9039: Type containing private name 'n' can't be used with --isolatedDeclarations.
!!! related TS9027 v2.ts:2:14: Add a type annotation to the variable v2.
} => {
return null!
}

Просмотреть файл

@ -727,7 +727,7 @@ const test_55033_minimal = factory_55033_minimal((b: string) => {})
function factory_55033<const T extends readonly unknown[]>(cb: (...args: T) => void) {
>factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>cb : (...args: T) => void
> : ^^^^ ^^ ^^^^^
>args : T
@ -758,7 +758,7 @@ const t1_55033 = factory_55033((a: { test: number }, b: string) => {})(
>factory_55033((a: { test: number }, b: string) => {}) : <const K extends readonly [a: { test: number; }, b: string]>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>a : { test: number; }
@ -790,7 +790,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})(
>factory_55033((a: { test: number }, b: string) => {}) : <const K extends readonly [a: { test: number; }, b: string]>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>factory_55033 : <const T extends readonly unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>a : { test: number; }
@ -820,7 +820,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})(
function factory_55033_2<const T extends unknown[]>(cb: (...args: T) => void) {
>factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>cb : (...args: T) => void
> : ^^^^ ^^ ^^^^^
>args : T
@ -851,7 +851,7 @@ const t1_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})(
>factory_55033_2((a: { test: number }, b: string) => {}) : <const K extends [a: { test: number; }, b: string]>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>a : { test: number; }
@ -883,7 +883,7 @@ const t2_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})(
>factory_55033_2((a: { test: number }, b: string) => {}) : <const K extends [a: { test: number; }, b: string]>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>factory_55033_2 : <const T extends unknown[]>(cb: (...args: T) => void) => <const K extends T>(...args: K) => K
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^ ^^ ^^^^^
> : ^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>a : { test: number; }

Просмотреть файл

@ -14,11 +14,11 @@ type Narrow<A> = (A extends Narrowable ? A : never) | ({
const satisfies =
>satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
<TWide,>() =>
><TWide,>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => narrow : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
<TNarrow extends TWide>(narrow: Narrow<TNarrow>) =>
><TNarrow extends TWide>(narrow: Narrow<TNarrow>) => narrow : <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
@ -58,7 +58,7 @@ const item1 = satisfies<Item>()({ value: "1" });
>satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
>{ value: "1" } : { value: "1"; }
> : ^^^^^^^^^^^^^^^
>value : "1"
@ -74,7 +74,7 @@ const item2 = satisfies<Item>()({ value: "2" });
>satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
>{ value: "2" } : { value: "2"; }
> : ^^^^^^^^^^^^^^^
>value : "2"
@ -90,7 +90,7 @@ const item3 = satisfies<Item>()({ value: null });
>satisfies<Item>() : <TNarrow extends Item>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>satisfies : <TWide>() => <TNarrow extends TWide>(narrow: Narrow<TNarrow>) => Narrow<TNarrow>
> : ^ ^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^
>{ value: null } : { value: null; }
> : ^^^^^^^^^^^^^^^^
>value : null

Просмотреть файл

@ -7,7 +7,7 @@ class A {
public f1() {
>f1 : () => (X: any) => void
> : ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^^^^^^^^
return (X) => {
>(X) => { } : (X: any) => void

Просмотреть файл

@ -7,7 +7,7 @@ class A {
public f1() {
>f1 : () => (X: any, Y: any) => void
> : ^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^
> : ^^^^^^^ ^^^^^ ^^^^^^^^^^^^
return (X, Y) => {
>(X, Y) => { Y; } : (X: any, Y: any) => void

Просмотреть файл

@ -823,7 +823,7 @@ declare function getOrgUser(id: string, orgId: number, options?: {
y?: number;
z?: boolean;
}): void;
declare function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U): (...args: T) => U;
declare function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U): (...args: [...T]) => U;
type Numbers = number[];
type Unbounded = [...Numbers, boolean];
declare const data: Unbounded;

Просмотреть файл

@ -1601,7 +1601,7 @@ type R36 = DropLast<readonly []>;
function curry<T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) {
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>f : (...args: [...T, ...U]) => R
> : ^^^^ ^^ ^^^^^
>args : [...T, ...U]
@ -1650,7 +1650,7 @@ const c0 = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => nu
>curry(fn1) : (a: number, b: string, c: boolean, d: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn1 : (a: number, b: string, c: boolean, d: string[]) => number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^
@ -1660,7 +1660,7 @@ const c1 = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number
>curry(fn1, 1) : (b: string, c: boolean, d: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn1 : (a: number, b: string, c: boolean, d: string[]) => number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1672,7 +1672,7 @@ const c2 = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number
>curry(fn1, 1, 'abc') : (c: boolean, d: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn1 : (a: number, b: string, c: boolean, d: string[]) => number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1686,7 +1686,7 @@ const c3 = curry(fn1, 1, 'abc', true); // (d: string[]) => number
>curry(fn1, 1, 'abc', true) : (d: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn1 : (a: number, b: string, c: boolean, d: string[]) => number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1702,7 +1702,7 @@ const c4 = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number
>curry(fn1, 1, 'abc', true, ['x', 'y']) : () => number
> : ^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn1 : (a: number, b: string, c: boolean, d: string[]) => number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1738,7 +1738,7 @@ const c10 = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number
>curry(fn2) : (x: number, b: boolean, ...args: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn2 : (x: number, b: boolean, ...args: string[]) => number
> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^
@ -1748,7 +1748,7 @@ const c11 = curry(fn2, 1); // (b: boolean, ...args: string[]) => number
>curry(fn2, 1) : (b: boolean, ...args: string[]) => number
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn2 : (x: number, b: boolean, ...args: string[]) => number
> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1760,7 +1760,7 @@ const c12 = curry(fn2, 1, true); // (...args: string[]) => number
>curry(fn2, 1, true) : (...b: string[]) => number
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn2 : (x: number, b: boolean, ...args: string[]) => number
> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1774,7 +1774,7 @@ const c13 = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number
>curry(fn2, 1, true, 'abc', 'def') : (...b: string[]) => number
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn2 : (x: number, b: boolean, ...args: string[]) => number
> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^^^
>1 : 1
@ -1802,7 +1802,7 @@ const c20 = curry(fn3); // (...args: string[]) => number
>curry(fn3) : (...b: string[]) => number
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn3 : (...args: string[]) => number
> : ^^^^ ^^ ^^^^^^^^^^^
@ -1812,7 +1812,7 @@ const c21 = curry(fn3, 'abc', 'def'); // (...args: string[]) => number
>curry(fn3, 'abc', 'def') : (...b: string[]) => number
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn3 : (...args: string[]) => number
> : ^^^^ ^^ ^^^^^^^^^^^
>'abc' : "abc"
@ -1826,7 +1826,7 @@ const c22 = curry(fn3, ...sa); // (...args: string[]) => number
>curry(fn3, ...sa) : (...b: string[]) => number
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^
>curry : <T extends unknown[], U extends unknown[], R>(f: (...args: [...T, ...U]) => R, ...a: T) => (...b: U) => R
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^ ^^^^^^
>fn3 : (...args: string[]) => number
> : ^^^^ ^^ ^^^^^^^^^^^
>...sa : string
@ -2218,8 +2218,8 @@ declare function getOrgUser(id: string, orgId: number, options?: { y?: number, z
> : ^^^^^^^^^^^^^^^^^^^
function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) {
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^ ^^^^^^
>method : (...args: [...T, object]) => U
> : ^^^^ ^^ ^^^^^
>args : [...T, object]
@ -2245,16 +2245,16 @@ function callApi<T extends unknown[] = [], U = void>(method: (...args: [...T, ob
callApi(getUser);
>callApi(getUser) : (id: string) => string
> : ^^^^^^^^^^^^^^^^^^^^^^
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^ ^^^^^^
>getUser : (id: string, options?: { x?: string; }) => string
> : ^ ^^ ^^ ^^^ ^^^^^
callApi(getOrgUser);
>callApi(getOrgUser) : (id: string, orgId: number) => void
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: T) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^
>callApi : <T extends unknown[] = [], U = void>(method: (...args: [...T, object]) => U) => (...args: [...T]) => U
> : ^ ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^ ^^ ^^^^^^ ^^^^^^
>getOrgUser : (id: string, orgId: number, options?: { y?: number; z?: boolean; }) => void
> : ^ ^^ ^^ ^^ ^^ ^^^ ^^^^^

Просмотреть файл

@ -4,7 +4,7 @@ function f1() {
type A = [s: string];
type C = [...A, ...A];
return function fn(...args: C) { }
return function fn(...args: C) { } satisfies any
}
function f2() {
@ -13,5 +13,5 @@ function f2() {
type C = [c: string];
type D = [...A, ...A, ...B, ...A, ...B, ...B, ...A, ...C];
return function fn(...args: D) { }
return function fn(...args: D) { } satisfies any;
}