You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No problem. If I were you I would edit your initial post with the new example (and I'll probably remove / edit my comment too).
This looks familiar to other posts I've seen but I can't say if this is a duplicate. Your name parameter should be something like T["name"] though, as it might be the case that T is instantiated with something more precise than string, like "foobar".
This seems to boil down to whether { name: T["name"]; } & Pick<T, Exclude<keyof T, "name">> should be assignable to T.
Possibly; this issue also looks similar #28821. I don't know enough to say if this is a duplicate so I would wait for someone more knowledgeable to drop by.
Activity
jack-williams commentedon Dec 13, 2018
EDIT: Outdated comment. I wont delete the comment so you can read the history if you want.
jack-williams commentedon Dec 13, 2018
No problem. If I were you I would edit your initial post with the new example (and I'll probably remove / edit my comment too).
This looks familiar to other posts I've seen but I can't say if this is a duplicate. Your
nameparameter should be something likeT["name"]though, as it might be the case thatTis instantiated with something more precise thanstring, like"foobar".This seems to boil down to whether
{ name: T["name"]; } & Pick<T, Exclude<keyof T, "name">>should be assignable toT.Sorry I can't be more help!
hronro commentedon Dec 13, 2018
Jack Williams (@jack-williams) Thanks. And I found a issue here which is similar: #28748
So maybe my issue is duplicated?
jack-williams commentedon Dec 13, 2018
Possibly; this issue also looks similar #28821. I don't know enough to say if this is a duplicate so I would wait for someone more knowledgeable to drop by.
DanielRosenwasser commentedon Dec 13, 2018
Potentially a dupe; I'll let Anders Hejlsberg (@ahejlsberg) decide.
sveyret commentedon Dec 15, 2018
Also similar to #28884.
ahejlsberg commentedon Dec 17, 2018
Duplicate of #28884.
typescript-bot commentedon Dec 20, 2018
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.