Closed amoutonbrady closed 4 years ago
Hey, I did not see any contributor guideline or anything. Hopefully, I'm doing things right.
I'd like to propose a small QOL change. To be able to type the return of a $cookie.get & $cookie.getAll which would default to any if not set.
$cookie.get
$cookie.getAll
Therefore this would be possible:
this.$cookie.set('hello', 'world'); const value = this.$cookie.get<string>('hello'); // value will be typed as a string instead of any;
Hi @amoutonbrady, thanks for contributing. It looks like a nice addition to the library, I'll merge it when I have some free time.
@amoutonbrady your PR is now merged and you can use it with version 2.1.4.
2.1.4
Hey, I did not see any contributor guideline or anything. Hopefully, I'm doing things right.
I'd like to propose a small QOL change. To be able to type the return of a
$cookie.get
&$cookie.getAll
which would default to any if not set.Therefore this would be possible: