Skip to content

Commit 1317aa5

Browse files
authored
refactor(query-core): use constructor shorthand to remove duplicated code (TanStack#6660)
1 parent df08994 commit 1317aa5

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

packages/query-core/src/queryObserver.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ export class QueryObserver<
4343
TQueryData = TQueryFnData,
4444
TQueryKey extends QueryKey = QueryKey,
4545
> extends Subscribable<QueryObserverListener<TData, TError>> {
46-
options: QueryObserverOptions<
47-
TQueryFnData,
48-
TError,
49-
TData,
50-
TQueryData,
51-
TQueryKey
52-
>
53-
5446
#client: QueryClient
5547
#currentQuery: Query<TQueryFnData, TError, TQueryData, TQueryKey> = undefined!
5648
#currentQueryInitialState: QueryState<TQueryData, TError> = undefined!
@@ -76,7 +68,7 @@ export class QueryObserver<
7668

7769
constructor(
7870
client: QueryClient,
79-
options: QueryObserverOptions<
71+
public options: QueryObserverOptions<
8072
TQueryFnData,
8173
TError,
8274
TData,
@@ -87,7 +79,6 @@ export class QueryObserver<
8779
super()
8880

8981
this.#client = client
90-
this.options = options
9182
this.#selectError = null
9283
this.bindMethods()
9384
this.setOptions(options)

0 commit comments

Comments
 (0)