Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/rxjs/useExtractedObservable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function useExtractedObservable<T = any, E = unknown, Immediate extends R
// Construct it first so that the `watch` can override the value if the observable emits immediately
const obsRef = shallowRef<E | undefined>(options?.initialValue)

watch(source as any, (value, oldValue, onCleanup) => {
watch(source as WatchSource<T>, (value, oldValue, onCleanup) => {
subscription?.unsubscribe()

if (typeof value !== 'undefined' && value !== null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rxjs/watchExtractedObservable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function watchExtractedObservable<T = any, E = unknown, Immediate extends
subscription = undefined
})

return watch(source as any, (value, oldValue, onCleanup) => {
return watch(source as WatchSource<T>, (value, oldValue, onCleanup) => {
subscription?.unsubscribe()

if (typeof value !== 'undefined' && value !== null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/watchDeep/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function watchDeep<
*/
export function watchDeep<T = any, Immediate extends Readonly<boolean> = false>(source: T | WatchSource<T>, cb: any, options?: Omit<WatchOptions<Immediate>, 'deep'>) {
return watch(
source as any,
source as WatchSource<T>,
cb,
{
...options,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/watchImmediate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function watchImmediate<T extends object>(
*/
export function watchImmediate<T = any>(source: T, cb: any, options?: Omit<WatchOptions, 'immediate'>) {
return watch(
source as any,
source as WatchSource<T>,
cb,
{
...options,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/watchOnce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function watchOnce<T extends object>(
*/
export function watchOnce<T = any>(source: T, cb: any, options?: Omit<WatchOptions, 'once'>) {
return watch(
source as any,
source as WatchSource<T>,
cb,
{
...options,
Expand Down