Created
February 6, 2022 16:20
-
-
Save B4nan/9ff8b869e968f01906279181d2d6b5de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const book = {} as Book; | |
const dto = wrap(book).toObject(); // EntityDTO<Book> | |
// this is now possible, but with the PK union type, we would need to type cast all the time | |
const name = dto.author.name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment