Skip to content

Commit

Permalink
chore: remove reused code & correct @since comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiboss committed Nov 22, 2024
1 parent 8682b36 commit d985ab3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/reactive/src/enhancers/react/with-use-derived.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface WithUseDerivedContributes<State extends object, Derived extends
* @param mapFn - The function to map the state to the derived state.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
3 changes: 1 addition & 2 deletions packages/reactive/src/enhancers/react/with-use-snapshot.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useSnapshot } from '../../react/use-snapshot.js'
import { isFunction } from '../../utils/index.js'
import { withSnapshot } from '../vanilla/with-snapshot.js'

import type { StoreUseSnapshot } from '../../react/create-with-hooks.js'
import type { SnapshotOptions, SnapshotSelector } from '../../react/use-snapshot.js'
Expand All @@ -19,7 +18,7 @@ export interface WithUseSnapshotContributes<State extends object> {
* @param store - The store to enhance.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface WithUseSubscribeContributes<State extends object> {
* @param store - The store to be enhanced.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive/src/enhancers/vanilla/with-derived.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface WithDerivedContributes<State extends object, D extends object =
* @param mapFn - The function to map the state to the derived state.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive/src/enhancers/vanilla/with-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface WithSnapshotContributes<State extends object> {
* @param store - The store to enhance.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive/src/enhancers/vanilla/with-subscribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface WithSubscribeContributes<State extends object> {
* @param store - The store to be enhanced.
* @returns The enhanced store.
*
* @since 0.5.0
* @since 0.2.0
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive/src/react/create-with-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export function createWithHooks<State extends object>(
initialState: State,
options: StoreCreateOptions = {},
): Store<State> {
return withUseSnapshot(withUseSubscribe(withSnapshot(withSubscribe(createVanilla<State>(initialState, options)))))
return withUseSnapshot(withUseSubscribe(createVanilla<State>(initialState, options)))
}

0 comments on commit d985ab3

Please sign in to comment.