@@ -11,7 +11,7 @@ export interface FluxStandardAction<Payload, Meta = undefined> {
11
11
* By convention, if `error` is `true`, the `payload` SHOULD be an error object.
12
12
* This is akin to rejecting a promise with an error object.
13
13
*/
14
- payload : Payload ;
14
+ payload ? : Payload ;
15
15
/**
16
16
* The optional `error` property MAY be set to true if the action represents an error.
17
17
* An action whose `error` is true is analogous to a rejected Promise.
@@ -26,7 +26,10 @@ export interface FluxStandardAction<Payload, Meta = undefined> {
26
26
meta ?: Meta ;
27
27
}
28
28
29
- export interface ErrorFluxStandardAction < CustomError extends Error , Meta = undefined > extends FluxStandardAction < CustomError , Meta > {
29
+ export interface ErrorFluxStandardAction <
30
+ CustomError extends Error ,
31
+ Meta = undefined
32
+ > extends FluxStandardAction < CustomError , Meta > {
30
33
error : true ;
31
34
}
32
35
@@ -38,14 +41,21 @@ export type FSA<Payload, Meta = undefined> = FluxStandardAction<Payload, Meta>;
38
41
/**
39
42
* Alias for ErrorFluxStandardAction.
40
43
*/
41
- export type ErrorFSA < CustomError extends Error , Meta = undefined > = ErrorFluxStandardAction < CustomError , Meta > ;
44
+ export type ErrorFSA <
45
+ CustomError extends Error ,
46
+ Meta = undefined
47
+ > = ErrorFluxStandardAction < CustomError , Meta > ;
42
48
43
49
/**
44
50
* Returns `true` if `action` is FSA compliant.
45
51
*/
46
- export function isFSA < Payload , Meta = undefined > ( action : any ) : action is FluxStandardAction < Payload , Meta > ;
52
+ export function isFSA < Payload , Meta = undefined > (
53
+ action : any
54
+ ) : action is FluxStandardAction < Payload , Meta > ;
47
55
48
56
/**
49
57
* Returns `true` if `action` is FSA compliant error.
50
58
*/
51
- export function isError < CustomError extends Error , Meta = undefined > ( action : any ) : action is ErrorFluxStandardAction < CustomError , Meta > ;
59
+ export function isError < CustomError extends Error , Meta = undefined > (
60
+ action : any
61
+ ) : action is ErrorFluxStandardAction < CustomError , Meta > ;
0 commit comments