wix-incubator / corvid-types

Type definitions for Corvid by Wix
MIT License
5 stars 3 forks source link

Bug: wrong required parameters in PrefetchItems (wixSite.prefetchPageResources) #19

Closed shoonia closed 4 years ago

shoonia commented 4 years ago

Parameters "lightboxes", and "pages" in "PrefetchItems" declared as a required.

corvid-cli: 0.2.2 corvid-types: 0.1.90

wixSite.prefetchPageResources({
    lightboxes: ["MyLightBoxes"],
});

error:

Argument of type '{ lightboxes: string[]; }' is not assignable to parameter of type 'PrefetchItems'.
  Property 'pages' is missing in type '{ lightboxes: string[]; }' but required in type 'PrefetchItems'.ts(2345)
declaration.d.ts(4297, 9): 'pages' is declared here.

But these parameters aren't required, we can use it separately.

agankarin commented 4 years ago

Thanks @shoonia, we had resolved this issue