...

/

Quiz

Quiz

Test your knowledge on generic types with this quiz.

Working with generic types

1.

We have a type within our codebase for a comment:

type Comment = {
  comment: string;
  email: string;
}

What generic type can we use with Comment that would create a type equivalent to the type below:

type ReadonlyComment = {
  readonly comment: string;
  readonly email: string;
}
A.

Readonly<Comment>

B.

Required<Comment>

C.

Partial<Comment>


1 / 5

Well done!

Now that we ...