Home Reference Source

Function

Static Public Summary
public

addToCart(productId: *): {"type": *, "productId": *}

public

checkout(): {"type": *}

public

checkout(action$: *, store: *): any | * | Observable

checkout epic.

public

checkoutFailure(error: *): {"type": *, "error": *}

public

checkoutSuccess(cart: *): {"type": *, "cart": *}

public

getAllProducts(): {"type": *}

public

products(state: *[], action: *): *

public

receiveProducts(products: *): {"type": *, "products": *}

public

removeFromCart(productId: *): {"type": *, "productId": *}

public

rootReducer(state: *, action: *): *

Returns the combined reducer.

public

searchProducts(action$: *, store: *): any | * | Observable

search products epic

Static Public

public addToCart(productId: *): {"type": *, "productId": *} source

Params:

NameTypeAttributeDescription
productId *

Return:

{"type": *, "productId": *}

public checkout(): {"type": *} source

Return:

{"type": *}

public checkout(action$: *, store: *): any | * | Observable source

checkout epic.

Params:

NameTypeAttributeDescription
action$ *
store *

Return:

any | * | Observable

public checkoutFailure(error: *): {"type": *, "error": *} source

Params:

NameTypeAttributeDescription
error *

Return:

{"type": *, "error": *}

public checkoutSuccess(cart: *): {"type": *, "cart": *} source

Params:

NameTypeAttributeDescription
cart *

Return:

{"type": *, "cart": *}

public getAllProducts(): {"type": *} source

Return:

{"type": *}

public products(state: *[], action: *): * source

Params:

NameTypeAttributeDescription
state *[]
  • optional
  • default: []
action *

Return:

*

public receiveProducts(products: *): {"type": *, "products": *} source

Params:

NameTypeAttributeDescription
products *

Return:

{"type": *, "products": *}

public removeFromCart(productId: *): {"type": *, "productId": *} source

Params:

NameTypeAttributeDescription
productId *

Return:

{"type": *, "productId": *}

public rootReducer(state: *, action: *): * source

Returns the combined reducer.

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public searchProducts(action$: *, store: *): any | * | Observable source

search products epic

Params:

NameTypeAttributeDescription
action$ *
store *

Return:

any | * | Observable