Add Type Parameters to a Function
In this exercise, we have a function called
createSet which returns a
Set which can only contain unique values:
We also have a
numberSet, and an
unknownSet that each pass in a type argument to
0:22 This stringSet we can see here it's supposed to be Set<string> but actually it's Set<unknown>. This one is supposed to be Set, but it's Set. This one, we're happy with it, being Set. Your job is to figure out what this syntax is all about and how we can change this function to make this syntax behave as expected.