Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@logux/actions

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logux/actions - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

23

define-action/index.d.ts

@@ -21,4 +21,21 @@ import { Action, AnyAction } from '@logux/core'

/**
* Define action creator.
*
* ```js
* import { defineAction } from '@logux/actions'
*
* export const renameAction = defineAction('rename')
*
* renameAction({ newName: 'New' }) //=> { type: 'rename', nameName: 'New' }
* renameAction.type //=> 'rename'
* renameAction.match(action) //=> boolean
* ```
*
* @param type Action’s type.
* @param creator Function to convert arguments to action object.
* @returns Function which return an action.
*/
interface DefineAction {
<CreatedAction extends Action>(type: string): ActionCreator<
<CreatedAction extends Action>(type: CreatedAction['type']): ActionCreator<
CreatedAction,

@@ -29,4 +46,4 @@ [Omit<CreatedAction, 'type'>]

<CreatedAction extends Action, CreatorArgs extends any[]>(
type: string,
creator: (...args: CreatorArgs) => CreatedAction
type: CreatedAction['type'],
creator?: (...args: CreatorArgs) => CreatedAction
): ActionCreator<CreatedAction, CreatorArgs>

@@ -33,0 +50,0 @@ }

2

package.json
{
"name": "@logux/actions",
"version": "0.2.1",
"version": "0.2.2",
"description": "Types and action creators for build-in Logux actions",

@@ -5,0 +5,0 @@ "keywords": [

@@ -20,4 +20,10 @@ import { Action, AnyAction } from '@logux/core'

/**
* Returns `logux/processed` action.
*/
export const loguxProcessed: ActionCreator<LoguxProcessedAction>
/**
* Returns `logux/undo` action.
*/
export function loguxUndo<

@@ -24,0 +30,0 @@ RevertedAction extends Action = AnyAction,

@@ -29,6 +29,15 @@ import { ActionCreator } from '../define-action/index.js'

/**
* Returns `logux/subscribe` action.
*/
export const loguxSubscribe: ActionCreator<LoguxSubscribeAction>
/**
* Returns `logux/subscribed` action.
*/
export const loguxSubscribed: ActionCreator<LoguxSubscribedAction>
/**
* Returns `logux/unsubscribe` action.
*/
export const loguxUnsubscribe: ActionCreator<LoguxSubscribeAction>

@@ -75,2 +75,18 @@ import { ActionCreator } from '../define-action/index.js'

/**
* Returns actions for CRDT Map.
*
* ```js
* import { defineSyncMapActions } from '@logux/actions'
*
* const [
* createUserAction,
* changeUserAction,
* deleteUserAction,
* createdUserAction,
* changedUserAction,
* deletedUserAction
* ] = defineSyncMapActions('users')
* ```
*/
export function defineSyncMapActions<Value extends SyncMapValues>(

@@ -77,0 +93,0 @@ plural: string

@@ -14,4 +14,10 @@ import { ActionCreator } from '../define-action/index.js'

/**
* Returns `0` action.
*/
export const zero: ActionCreator<ZeroAction>
/**
* Returns `0/clean` action.
*/
export const zeroClean: ActionCreator<ZeroCleanAction>
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc