Hi all
Can I use phoenix channel in combination with typescript or it exits already a library?
Thanks
Hi all
Can I use phoenix channel in combination with typescript or it exits already a library?
Thanks
Typescript can already use javascript libraries, you just need to define the interface of what of it that you want to use within typescript itself.
You could roll your own typing or use it as-is by using require.
const { Socket } = require('phoenix'); // no typing available
const socket:any = new Socket(...)
This will at least get you going and you can always come back later to optimize the typing.
ok, so I can’t help myself: here is an initial definition to play around with https://github.com/akeating/typed-phoenix