TypeScript Creating Object Field Names as Union Type if Field Type is Function

When you remove [keyof T] section in line 169, you will see a big difference.

As you see in the following screenshot, it created an Union Object Type, but most of the field types are never. That's why, in order to list values of type, we need to have that deleted section.

Leave a Reply

Your email address will not be published.