Hi all,
We have a application which uses typescript and are facing issues to embed the launch script. Need help on how we could do this.
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @jane_12
What issues you're facing .. could you please provide more details like error or screenshot?
Meantime, please see below documentation and see if you have embed the code in right way
Views
Replies
Total Likes
Hello @jane_12
What issues you're facing .. could you please provide more details like error or screenshot?
Meantime, please see below documentation and see if you have embed the code in right way
Views
Replies
Total Likes
Hi @Gokul_Agiwal ,
Don't have the screenshots but the application uses TypeScript instead of JavaScript for client-side programming. So the launch embed script which is JavaScript, isn't working.
Views
Replies
Total Likes
so In this case, you have to include as external JS library ( Launch library) and import it into your typescript application.
Views
Replies
Total Likes
Technically, there should be no issues running Typescript and Javascript together on the same site.. Typescript is a superset of Javascript, unless of course you are using a compiler which is converting all .js files to use the .ts file extension (and it's changing the Adobe Files as well). Since the Adobe scripts aren't hosted on your server, that could affect targeting... but surely you have ads or other third party scripts loading on your site that are using JS...
Can you provide more information about the issue you are getting? I don't work with Typescript sites, so I don't have an "actual" example to work with and can only guess at the issue you are encountering....
Views
Replies
Total Likes
@Gokul_Agiwal and @Jennifer_Dungan ,
The application uses SharePoint Framework (SPFx) used for development of SharePoint Online applications.
Views
Replies
Total Likes
Oh dear... it's SharePoint too?
Is the code live? Would you be willing to share the URL (even if through a private message) so we can see what is happening in the network panel and console logs?
Views
Replies
Total Likes
Though it's SharePoint but TS / JS works like on any other platforms except if you're facing some SharePoint related issues then it's different.
I think you need to import your JS ( _satellite / launchJS) as module
import * as _Satellite from './../folder/_Satellite';
and in the typescript declaration file ( tsconfig.json) and make sure you enable the below compiler options
{
"compilerOptions": {
"allowJs": true
"checkJs": false
}
}
Reference -
https://www.typescriptlang.org/tsconfig#allowJs
https://www.typescriptlang.org/tsconfig#checkJs
See if this method works. Let us know.
Views
Replies
Total Likes
Thanks for sharing this, will try this approach and let you know.
Views
Replies
Total Likes
it's a JS error.
Views
Replies
Total Likes
What's the error ? Is it possible to put logs / screenshot here
Views
Replies
Total Likes
@jane_12 Is your issues resolved?
If yes, could you please post the solution here so it will be helpful for others.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies