Skip to content

inference strangeness 6 #6611

Closed
Closed
@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd
export interface A<a> {
    value: a;
}

function fn<a>(values: A<a>, value: a) : void {
}

let handlers: A<(value: number) => void>;
fn(handlers, value => alert(value)); // < -- expected value: number, actual value: any

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions