Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

fix: return type must be list of products #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

limes007
Copy link

Description

I got some errors compiling my extended vsf test project and finally found out that this type is not correct and must be something like a product list. In https://github.com/vuestorefront/vue-storefront/blob/main/packages/core/src/factories/useProductFactory.ts PRODUCTS is expected here.

Related Issue

My derived project could not be compiled.

Type '(context: Context<any, any, any>, params: ProductsSearchParams & { customQuery?: CustomQuery; }) => Promise<Product[]>' is not assignable to type '(context: Context<any, any, any>, params: ProductsSearchParams & { customQuery?: CustomQuery; }) => Promise<Product>'.

Motivation and Context

This makes it easier for newbies like me.

How Has This Been Tested?

My derived project could be compiled after this fix.

Screenshots (if appropriate):

n/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant