I am creating a hosted app written in Angular and Typescript using npm. The following are in my package.json

“tizen-common-web”: “^2.0.1”,
“tizen-tv-webapis”: “^2.0.0”,
@types/tizen-common-web”: “^2.0.4”,
@types/tizen-tv-webapis”: “^2.0.4”,

I can successfully reference objects in tizen-tv-webapis, but the app fails when ever I try to reference objects in tizen-common-web. For example

import { time } from ‘tizen-common-web’;

console.log( time.getLocalTimezone() )

any reference to any object in tizen-common-web gives the same error

Uncaught TypeError: Cannot destructure property ‘AlarmAbsolute’ of ‘window.tizen’ as it is undefined.

Also declaring it in the following way results in the same error

import { time as cwTime } from ‘tizen-common-web’;
const { getLocalTimezone } = cwTime;

Is there something I need to add to config.xml to allow access to this object?

Am I all alone here? Is there anyone coding in Typescript using the packages listed above? Is anyone creating a hosted app for Samsung TV?

Do as directed by npm in application. when you run the same application on Samsung TV it will work.

the answer I got from Samsung is that for a purely hosted app, where the config.xml points to a URL hosted elsewhere (and therefore no index.html or js in the bundle uploaded to the Samsung store), the library tizen-common-web is blocked for security reasons. This means it is pretty much impossible to create a purely hosted app, at least one that does anything useful.