0

I've developed a PWA and I need to add a custom service worker to sync the client database data with server database. I did a search and I found examples in JavaScript.

My first question is: is there a way to write my custom service worker in typescript?

If no, is there a way to use type script class in a JavaScript file? I followed this link:

Calling properly TypeScript code from JavaScript

But I use DI in my TS classes and pass instance to constructor. How can I use these classes in JavaScript?

Dale K
  • 25,246
  • 15
  • 42
  • 71
NMMA
  • 173
  • 1
  • 2
  • 13

0 Answers0