You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Client.js I noticed that the typeresolvers are initialised:
let typeResolvers = [
new TypeResolver('about_us', () => new AboutUs()),
new TypeResolver('accessory', () => new Accessory()),
new TypeResolver('article', () => new Article()),
new TypeResolver('brewer', () => new Brewer()),
new TypeResolver('cafe', () => new Cafe()),
new TypeResolver('coffee', () => new Coffee()),
new TypeResolver('fact_about_us', () => new FactAboutUs()),
new TypeResolver('grinder', () => new Grinder()),
new TypeResolver('hero_unit', () => new HeroUnit()),
new TypeResolver('home', () => new Home()),
new TypeResolver('hosted_video', () => new HostedVideo()),
new TypeResolver('office', () => new Office()),
new TypeResolver('tweet', () => new Tweet())
];
From the KenticoCloudDeliveryTypeScriptSDK:
But, correct me if i am wrong, they are never used? Why bother configuring them? Or are they also used for parsing links in Rich text elements?
The text was updated successfully, but these errors were encountered:
Hi, I just randomly bumped into this question - as far as I can see the models are actually being used. They are not used for 'intellisense' of particular properties, but if you take a look e.g. here , you will see that the models are used to 'map' properties from Kentico cloud (which often contains underscore) to more javascript friendly format (camelCase). Additionally links are being resolved as well with resolveContentLink.
These type resolvers are not necessary though - you can use SDK without them.
You can also use model generator to generate these models automatically for you.
Hi Guys,
In the Client.js I noticed that the typeresolvers are initialised:
From the KenticoCloudDeliveryTypeScriptSDK:
But, correct me if i am wrong, they are never used? Why bother configuring them? Or are they also used for parsing links in Rich text elements?
The text was updated successfully, but these errors were encountered: