File tree Expand file tree Collapse file tree 3 files changed +5
-32
lines changed Expand file tree Collapse file tree 3 files changed +5
-32
lines changed Original file line number Diff line number Diff line change 9090Is hosted on [ Deno Doc] ( https://doc.deno.land/https://deno.land/x/eloq/mod.ts )
9191📄
9292
93- ## Support
94-
95- Open an Issue, I will check it a soon as possible 👀
96-
97- If you want to hurry me up a bit
98- [ send me a tweet] ( https://twitter.com/UltiRequiem ) 😆
99-
100- Consider [ supporting me on Patreon] ( https://patreon.com/UltiRequiem ) if you like
101- my work 🙏
102-
103- Don't forget to start the repo ⭐
104-
105- ## Versioning
106-
107- We use [ Semantic Versioning] ( http://semver.org ) . For the versions available, see
108- the [ tags] ( https://github.com/UltiRequiem/eloquent-javascript/tags ) 🏷️
109-
110- ## Authors
111-
112- [ Eliaz Bobadilla] ( https://ultirequiem.com ) - Creator and Maintainer 💪
113-
114- See also the full list of
115- [ contributors] ( https://github.com/UltiRequiem/eloquent-javascript/contributors )
116- who participated in this project ✨
117-
11893## Licence
11994
12095Licensed under the MIT License 📄
Original file line number Diff line number Diff line change 1- export type FilterCallback < T = never > = (
1+ export type FilterPredicate < T > = (
22 item : T ,
33 index : number ,
44 array : readonly T [ ] ,
55) => unknown ;
66
7- export function filter < T > ( array : readonly T [ ] , test : FilterCallback < T > ) {
8- const result = [ ] ;
7+ export function filter < T > ( array : readonly T [ ] , test : FilterPredicate < T > ) {
8+ const result : T [ ] = [ ] ;
99
1010 const entries = array . entries ( ) ;
1111
Original file line number Diff line number Diff line change @@ -4,10 +4,8 @@ export type ForEachCallback<T> = (
44 array : readonly T [ ] ,
55) => void ;
66
7- export function forEach < T > ( array : T [ ] , callback : ForEachCallback < T > ) {
8- const entries = array . entries ( ) ;
9-
10- for ( const [ index , value ] of entries ) {
7+ export function forEach < T > ( array : readonly T [ ] , callback : ForEachCallback < T > ) {
8+ for ( const [ index , value ] of array . entries ( ) ) {
119 callback ( value , index , array ) ;
1210 }
1311}
You can’t perform that action at this time.
0 commit comments