Skip to content

[Errors] Message quality degradation for overload resolution errors #93

Description

@mhegazy
// @module: commonjs

// @Filename: foo_0.ts

class Foo<T extends {a: string; b:number;}>{

test: T;

constructor(x: T){}

}

export = Foo;

// @Filename: foo_1.ts

import foo = require("./foo_0");

var x = new foo(true); // Should error

var y = new foo({a: "test", b: 42}); // Should be OK

var z: number = y.test.b;

Expected:

!!! Supplied parameters do not match any signature of call target:

!!! Type 'Boolean' is missing property 'a' from type '{ a: string; b: number; }'.

Actual:

‌!!! Supplied parameters do not match any signature of call target.

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions