Closed as not planned
Description
TS version: 4.9.5
playground
type A1 = {
key: 'id'
type: 'date'
format?: string
}
type A2 = {
key: 'id'
value?: (v: number) => any
}
type A3 = {
key: 'name'
value?: (v: string) => any
}
const obj: A1 | A2 | A3 = {
key: 'id',
value: v => v // Parameter 'v' implicitly has an 'any' type.(7006)
}
When I try to upgrade the TS version to 5.1.6, problem solved.
Is there any solutions to solve this problem without upgrading the TS version?