-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(fromEvent): fix type error of element reference #4728
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
Conversation
packages/rxjs/toObserver/index.md
Outdated
@@ -16,6 +16,8 @@ import { shallowRef } from 'vue' | ||
|
||
const count = shallowRef(0) | ||
const button = shallowRef<HTMLButtonElement | null>(null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just change it to useTemplateRef
.
packages/rxjs/README.md
Outdated
@@ -35,7 +35,9 @@ import { concatAll, map, mergeMap, pluck, scan, take } from 'rxjs/operators' | ||
import { ref } from 'vue' | ||
|
||
const BASE_URL = 'https://jsonplaceholder.typicode.com' | ||
const button = ref<HTMLButtonElement>(null) | ||
const button = ref<HTMLButtonElement | null>(null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Do we need to handle the case where the |
…ere elements may be `null`
Yes. Of course. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Type 'null' is not assignable to type 'HTMLElement
…e 'HTMLElement'`
Before submitting the PR, please make sure you do the following
fixes #123
).Description
fix typescript error.
Additional context