Closed boserup closed 2 months ago
Hi I've had a go at implementing this and it is now published on the @experimental
tag, please try that out and let me know if it fulfills your needs.
Types are published as of verso-browser@1.4.0, @tjek/sdk@0.16.0, shopgun-sdk@4.22.0 and incito-browser@2.6.0. Let me know if you need anything improved in them
@klarstrup Thank you! I quickly tested it, and can see most types were resolved correctly from shopgun-sdk
. We manually fixed the rest to import directly from the kits: import type { V2Hotspot } from 'lib/kits/core/index'
Oh I would prefer you stay out of those extraneously declared modules, soon those won't be exposed. I've published a new version that exposes those API model types properly.
That makes sense. We were able to resolve V2Hotspot
from shopgun-sdk
, and some of the other types we used. However PagedViewer
from PagedPublicationKit
is still only available via the kit-import.
The same goes for PagedPublicationEventTracking
(lib/kits/paged-publication/event-tracking
).
Those two are the only remaining unresolved types we are using as of today.
I would suggest that for the time being you derive those type from the related classes(i.e. ReturnType<IncitoPublicationBootstrapper["createViewer"]>
and ReturnType<IncitoPublicationBootstrapper["createViewer"]>['_eventTracking']
) while we at Tjek figure out the long-term approach for the type exports of this package.
We're currently using the SDK in a TypeScript project, and noticed that TypeScript types are not available via NPM. It would greatly improve our experience if the type declarations were either included in the package itself or published directly to NPM.