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

@equinor/fusion-observable

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-observable - npm Package Compare versions

Comparing version 8.3.1 to 8.3.2

5

dist/esm/create-action.js

@@ -19,6 +19,5 @@ export function createAction(type, prepareAction) {

export const matchActionSuffix = (suffix) => new RegExp(`${actionSuffixDivider}${suffix}$`);
export const actionBaseType = (action) => {
const type = typeof action === 'string' ? action : action.type;
export function getBaseType(type) {
return type.replace(matchActionSuffix('\\w+$'), '');
};
}
export function getType(actionCreator) {

@@ -25,0 +24,0 @@ return `${actionCreator}`;

2

dist/esm/index.js

@@ -7,3 +7,3 @@ export { castDraft } from 'immer';

export { actionMapper } from './action-mapper';
export { createAction, actionBaseType, } from './create-action';
export { createAction, getBaseType } from './create-action';
export { createAsyncAction, isRequestAction, isCompleteAction, isFailureAction, isSuccessAction, } from './create-async-action';

@@ -10,0 +10,0 @@ export { createReducer } from './create-reducer';

@@ -1,2 +0,2 @@

export const version = '8.3.1';
export const version = '8.3.2';
//# sourceMappingURL=version.js.map

@@ -45,5 +45,6 @@ import { Action, PayloadAction } from './types/actions';

export declare const matchActionSuffix: (suffix: string) => RegExp;
export declare const actionBaseType: (action: Action | string) => string;
type BaseType<T extends string> = T extends `${infer A}${typeof actionSuffixDivider}${infer R}` ? A : never;
export declare function getBaseType<T extends string>(type: T): BaseType<T>;
export declare function getType<T extends string>(actionCreator: PayloadActionCreator<any, T>): T;
type IfPrepareActionMethodProvided<PA extends PrepareAction<any> | void, True, False> = PA extends (...args: any[]) => any ? True : False;
export {};

@@ -7,5 +7,5 @@ export { castDraft } from 'immer';

export { actionMapper, type ActionCalls } from './action-mapper';
export { createAction, actionBaseType, type ActionCreatorWithPreparedPayload, } from './create-action';
export { createAction, getBaseType, type ActionCreatorWithPreparedPayload } from './create-action';
export { createAsyncAction, isRequestAction, isCompleteAction, isFailureAction, isSuccessAction, } from './create-async-action';
export { createReducer, ActionReducerMapBuilder } from './create-reducer';
export { createState, type FlowState } from './create-state';

@@ -32,2 +32,3 @@ export type TypeConstant = string;

export type ActionType<T> = T extends ActionCreator ? ActionType<ActionInstance<T>> : T extends Action ? T['type'] : never;
export type ActionBaseType<TAction extends Action> = TAction extends Action ? TAction['type'] extends `${infer AName}::${infer ASuffix}` ? AName : TAction['type'] : never;
export type ActionPayloadType<T> = ActionInstance<T> extends PayloadAction<any> ? ActionInstance<T>['payload'] : never;

@@ -34,0 +35,0 @@ export type ExtractAction<TAction extends Action, TType extends TypeConstant = ActionType<TAction>> = Extract<TAction, Action<TType>>;

@@ -1,1 +0,1 @@

export declare const version = "8.3.1";
export declare const version = "8.3.2";
{
"name": "@equinor/fusion-observable",
"version": "8.3.1",
"version": "8.3.2",
"description": "WIP",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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