Why generic arguments type not assignable

25 Views Asked by At

Why the ts code below wrong?

type Bar<T> = { value: T }

function bar(options: { callback: <T>(data: Bar<T>) => void }) {}

bar({
    callback(data: Bar<string>) {}
})

enter image description here

0

There are 0 best solutions below