Skip to content

Commit

Permalink
Add info about getWritableSignal() to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
e-oz committed Nov 16, 2023
1 parent c7bb68a commit 0e16b92
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v1.2.1
Add info about `getWritableSignal()` to README.

### v1.2.0
Method `getWritableSignal()` will not write initial value to the storage anymore.

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,19 @@ export type ReactiveStorage = {
*
* If localStorage is being used as the storage, the value will be pushed synchronously.
*/
getSignal<T>(key: string): Signal<T | undefined>;
getSignal<T>(key: string, options?: SignalOptions): Signal<T | undefined>;


/**
* Returns a signal with the current value for this key.
* The key becomes "observed" and future modifications will be
* written to the returned signal.
*
* The usage of the `set()` and `update()` methods of this signal will also update the storage key.
*
* If localStorage is being used as the storage, the value will be pushed synchronously.
*/
getWritableSignal<T>(key: string, options?: SignalOptions): WritableSignal<T | undefined>;

/**
* Set a key-value pair
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-reactive-storage",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"author": {
"name": "Evgeniy OZ",
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-reactive-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-reactive-storage",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"private": false,
"author": {
Expand Down

0 comments on commit 0e16b92

Please sign in to comment.