We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👋 Hello,
On this page https://www.totaltypescript.com/tutorials/beginners-typescript/combining-types-to-create-new-types/solution if I use as suggested at the end
type UserAndPosts = (): User & { posts: Post[] } export const getDefaultUserAndPosts = (): UserAndPosts => {
instead of export const getDefaultUserAndPosts = (): User & { posts: Post[] } => {
export const getDefaultUserAndPosts = (): User & { posts: Post[] } => {
I got errors: src/15-intersection.problem.ts:16:23 - error TS1005: '=>' expected.
What is wrong with it?
The text was updated successfully, but these errors were encountered:
Found it, should use type UserAndPosts = User & { posts: Post[] }
Sorry, something went wrong.
No branches or pull requests
👋 Hello,
On this page https://www.totaltypescript.com/tutorials/beginners-typescript/combining-types-to-create-new-types/solution
if I use as suggested at the end
instead of
export const getDefaultUserAndPosts = (): User & { posts: Post[] } => {
I got errors: src/15-intersection.problem.ts:16:23 - error TS1005: '=>' expected.
What is wrong with it?
The text was updated successfully, but these errors were encountered: