@voiceflow/common
Advanced tools
Comparing version 7.12.1 to 7.13.0
@@ -1,2 +0,9 @@ | ||
export declare const createAction: import("typescript-fsa").ActionCreatorFactory; | ||
import { AsyncActionCreators, Meta } from 'typescript-fsa'; | ||
export interface AsyncError<C extends number = never> { | ||
message: string; | ||
code?: C; | ||
} | ||
export declare const createAction: import("typescript-fsa").ActionCreatorFactory & { | ||
async: <P, R, E extends AsyncError<never> = AsyncError<never>>(type: string, commonMeta?: Meta | undefined) => AsyncActionCreators<P, R, E>; | ||
}; | ||
export declare const typeFactory: (...parts: string[]) => (name: string) => string; | ||
@@ -3,0 +10,0 @@ export declare class Channel<K extends string> { |
@@ -8,3 +8,6 @@ "use strict"; | ||
const typescript_fsa_1 = __importDefault(require("typescript-fsa")); | ||
exports.createAction = typescript_fsa_1.default(); | ||
const actionFactory = typescript_fsa_1.default(); | ||
exports.createAction = Object.assign(actionFactory, { | ||
async: (type, commonMeta) => actionFactory.async(type, commonMeta), | ||
}); | ||
const typeFactory = (...parts) => (name) => [...parts, name].join('.'); | ||
@@ -11,0 +14,0 @@ exports.typeFactory = typeFactory; |
@@ -1,2 +0,9 @@ | ||
export declare const createAction: import("typescript-fsa").ActionCreatorFactory; | ||
import { AsyncActionCreators, Meta } from 'typescript-fsa'; | ||
export interface AsyncError<C extends number = never> { | ||
message: string; | ||
code?: C; | ||
} | ||
export declare const createAction: import("typescript-fsa").ActionCreatorFactory & { | ||
async: <P, R, E extends AsyncError<never> = AsyncError<never>>(type: string, commonMeta?: Meta | undefined) => AsyncActionCreators<P, R, E>; | ||
}; | ||
export declare const typeFactory: (...parts: string[]) => (name: string) => string; | ||
@@ -3,0 +10,0 @@ export declare class Channel<K extends string> { |
import actionCreatorFactory from 'typescript-fsa'; | ||
export const createAction = actionCreatorFactory(); | ||
const actionFactory = actionCreatorFactory(); | ||
export const createAction = Object.assign(actionFactory, { | ||
async: (type, commonMeta) => actionFactory.async(type, commonMeta), | ||
}); | ||
export const typeFactory = (...parts) => (name) => [...parts, name].join('.'); | ||
@@ -4,0 +7,0 @@ export class Channel { |
{ | ||
"name": "@voiceflow/common", | ||
"description": "Junk drawer of utility functions", | ||
"version": "7.12.1", | ||
"version": "7.13.0", | ||
"author": "Voiceflow", | ||
@@ -76,3 +76,3 @@ "bugs": { | ||
}, | ||
"gitHead": "f43ee2ec8ffcc15179ed9fc3793b674fb8c76276" | ||
"gitHead": "36b1dcd0bb69a911e9c58721d943a66a712da4f4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
344722
6309