Skip to content

Commit 602366a

Browse files
committed
chore: make isLazy is protected property
1 parent fbea05e commit 602366a

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

.changeset/metal-olives-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"mobx-tanstack-query": patch
3+
---
4+
5+
make isLazy as protected property

src/inifinite-query.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ export class InfiniteQuery<
7575
>;
7676

7777
private isEnabledOnResultDemand: boolean;
78-
private isResultRequsted: boolean;
79-
private isLazy?: boolean;
78+
isResultRequsted: boolean;
79+
protected isLazy?: boolean;
8080

8181
/**
8282
* This parameter is responsible for holding the enabled value,
@@ -91,8 +91,8 @@ export class InfiniteQuery<
9191
>['enabled'];
9292
private _observerSubscription?: VoidFunction;
9393
private hooks?: QueryClientHooks;
94-
private errorListeners: InfiniteQueryErrorListener<TError>[];
95-
private doneListeners: InfiniteQueryDoneListener<TData>[];
94+
protected errorListeners: InfiniteQueryErrorListener<TError>[];
95+
protected doneListeners: InfiniteQueryDoneListener<TData>[];
9696

9797
constructor(
9898
config: InfiniteQueryConfig<

src/mutation.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,21 @@ export class Mutation<
3939

4040
result: MutationObserverResult<TData, TError, TVariables, TContext>;
4141

42-
private isLazy?: boolean;
43-
private isResetOnDestroy?: MutationFeatures['resetOnDestroy'];
42+
protected isLazy?: boolean;
43+
protected isResetOnDestroy?: MutationFeatures['resetOnDestroy'];
4444

45-
private settledListeners: MutationSettledListener<
45+
protected settledListeners: MutationSettledListener<
4646
TData,
4747
TError,
4848
TVariables,
4949
TContext
5050
>[];
51-
private errorListeners: MutationErrorListener<TError, TVariables, TContext>[];
52-
private doneListeners: MutationDoneListener<TData, TVariables, TContext>[];
51+
protected errorListeners: MutationErrorListener<
52+
TError,
53+
TVariables,
54+
TContext
55+
>[];
56+
protected doneListeners: MutationDoneListener<TData, TVariables, TContext>[];
5357

5458
private _observerSubscription?: VoidFunction;
5559
private hooks?: QueryClientHooks;

src/query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Query<
5959

6060
private isEnabledOnResultDemand: boolean;
6161
isResultRequsted: boolean;
62-
private isLazy?: boolean;
62+
protected isLazy?: boolean;
6363

6464
/**
6565
* This parameter is responsible for holding the enabled value,
@@ -74,8 +74,8 @@ export class Query<
7474
>['enabled'];
7575
private _observerSubscription?: VoidFunction;
7676
private hooks?: QueryClientHooks;
77-
private errorListeners: QueryErrorListener<TError>[];
78-
private doneListeners: QueryDoneListener<TData>[];
77+
protected errorListeners: QueryErrorListener<TError>[];
78+
protected doneListeners: QueryDoneListener<TData>[];
7979

8080
protected config: QueryConfig<
8181
TQueryFnData,

0 commit comments

Comments
 (0)