Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing syntax error in todos.md #57

Merged
merged 2 commits into from
Jul 29, 2023
Merged

Fixing syntax error in todos.md #57

merged 2 commits into from
Jul 29, 2023

Conversation

sebmos
Copy link
Contributor

@sebmos sebmos commented Jul 27, 2023

I noticed two small code issues while going through the tutorials:

First, a syntax error in todoActions$.

Second, a TypeScript warning in the definition of useTodos:

Type 'IterableIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.

Replacing [...todosMap.values()] with Array.from(todosMap.values()) makes that warning go away without customising TypeScript from its default value.

This fixes two small code issues that I came across was I was following the tutorial:

First, a syntax error in `todoActions$`.

Secondly, a TypeScript warning in the definition of `useTodos`:
```
Type 'IterableIterator<Todo>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
```

Replacing `[...todosMap.values()]` with `Array.from(todosMap.values())` makes that warning go away without customising TypeScript from its default value.
@josepot
Copy link
Member

josepot commented Jul 27, 2023

without customising TypeScript from its default value

Hey, just a heads up - I just check the calendar and we're actually in 2023! Crazy, right!? Time flies... 😜

If you're still rocking those tsconfig values from more than five years ago, cool, no problem! But, just so you know, they're not exactly "default values" anymore.

This library is very unapologetic about keeping up with the latest TypeScript versions and configurations. So, thanks for the suggestion, but we think we'll stick with what we've got.

@josepot josepot closed this Jul 27, 2023
@josepot
Copy link
Member

josepot commented Jul 27, 2023

First, a syntax error in todoActions$.

Ups! I missed this.

This is a good change, actually. Sorry, that I missed that.

Could you please leave the todo.values as they were and just change that in your PR?

@josepot josepot reopened this Jul 27, 2023
@sebmos sebmos changed the title Fixing syntax error & TypeScript warning in todos.md Fixing syntax error in todos.md Jul 28, 2023
Copy link
Member

@josepot josepot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@voliva voliva merged commit 149f51d into re-rxjs:master Jul 29, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants