Skip to content

Commit d954f36

Browse files
committed
fix: types again
1 parent 8a4850b commit d954f36

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Find it on `npm` - https://www.npmjs.com/package/vue-subscription.
1515

1616
## Introduction
1717

18-
Only 1.26 kB or gzip: 0.63 kB in size, the [useSubscription](#tldr) composable takes an initial value and returns an object with a reactive value that is by default shallow and only deep when explicitly enabled. The value property, `$value is not automatically unwrapped in template`. Additionally, it also provides `explicit getter and setter` if you like more control over the state.
18+
Only 1.3 kB or gzip: 0.7 kB in size, the [useSubscription](#tldr) composable takes an initial value and returns an object with a reactive value that is by default shallow and only deep when explicitly enabled. The value property, `$value is not automatically unwrapped in template`. Additionally, it also provides `explicit getter and setter` if you like more control over the state.
1919

2020
The package also provides a simple way to create reactive subscriptions that can be used to observe changes to a value and execute a list of subscribers when the value changes. It also includes methods to mutate the value for complex objects and trigger subscribers manually if and when needed rarely. Check out the [usage](#usage) examples.
2121

src/subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function useSubscription<T, D extends boolean = false>(value: T, deep: D
2020
const _subRef = (deep === false ? shallowRef(value) : ref(value)) as SubType;
2121
type SubValue = SubType['value'];
2222

23-
type Subscriber = (val: SubType) => Promise<void> | void;
23+
type Subscriber = (val: SubValue) => Promise<void> | void;
2424
const _subscriptions: Set<Subscriber> = new Set();
2525
/**
2626
* It loops through the Set of subscribers and executes each function with the value passed in as

0 commit comments

Comments
 (0)