Closed Shoghy closed 5 months ago
Hello. Thanks for opening a PR on Exercism 🙂
We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.
If you're interested in learning more about this auto-responder, please read this blog post.
Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.
I added and deleted generic type parameters from the list-ops exercise tests.
I did this because I was having problems compiling the code and I also noticed that several generic types were redudant, considering that the
List
class has a generic type likeArray
.I will list 2 of the changed tests and the reasons why I added or removed the generic type parameter, the other tests were changed for the same reasons:
In this first test I added the generic type parameter
<number>
tolist1
so that, even though the constantlist1
has no elements, TypeScript understands that it stores the same type value aslist2
. I did not add<number>
tolist2
because the type of value it stores is automatically deduced by the parameters sent in thecreate
function.In this case I understand that
<number>
infilter
refers to the type of value that the list returned byfilter
will store, however this is not necessary ifList
has a generic type, since the returned list will store the same type of value as the original list.