Open
Description
If a generic type is imported, it does not have parameters. This results in a compilation error.
For example, following typescript declaration will result in incorrect fsharp declaration.
module Compare {
export declare type OrderedComparator<T, U = T> = (lhs: T, rhs: U) => number;
}
module SortedArray {
import {OrderedComparator} from './Compare'
}
module Compare =
type OrderedComparator<'T> =
OrderedComparator<'T, 'T>
type [<AllowNullLiteral>] OrderedComparator<'T, 'U> =
[<Emit "$0($1...)">] abstract Invoke: lhs: 'T * rhs: 'U -> float
module SortedArray =
type OrderedComparator = __Compare.OrderedComparator
The correct type should be
type OrderedComparator<'T,'U> = Compare.OrderedComparator<'T,'U>
Metadata
Metadata
Assignees
Labels
No labels