**palmface** I was strictly trying to touch only the line of function takeSomeTypeOnly.
**palmface**
function takeSomeTypeOnly
These challenges are really nice, but please be specific with what we can and cannot do. D:
// change below function type definition 🔥 in order to allow only strict SomeType value I might be the one misunderstanding.
// change below function type definition 🔥 in order to allow only strict SomeType value
Thanks anyway! Your exercises keep my brain running
Thanks for the comment. Sorry if smth was not clear.
you can do it in one line
function takeSomeTypeOnly<T extends SomeType>(x: SomeType extends T ? T : never) { return x }
Nice try. Don't work.
const x2 = { prop: 'a' } as const; takeSomeTypeOnly(x2);
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
**palmface**
I was strictly trying to touch only the line offunction takeSomeTypeOnly
.These challenges are really nice, but please be specific with what we can and cannot do. D:
// change below function type definition 🔥 in order to allow only strict SomeType value
I might be the one misunderstanding.
Thanks anyway! Your exercises keep my brain running
Thanks for the comment. Sorry if smth was not clear.
you can do it in one line
Nice try. Don't work.