🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Typescript Types
Hello!
I am new to Solace and I was trying to implement Solace with typescript and I ran into a problem with it not having types.
Are there any future plans to have types for solace available?
And also are there any tips for working with solace in TypeScript?
Comments
-
Hi @pedroDimas,
I'm glad you're giving Solace a try There currently aren't any types for Solace available. We have a CodeLab course that walks you through building an application using Typescript/Solace's JavaScript API, and you can find that here: https://codelabs.solace.dev/codelabs/solace-battleship/index.html#0If you're new to event-driven architecture I recommend following along with the course in its entirety, but if you're just looking for some code, here's a direct link to a wrapper around our JS client to give you some ideas: https://github.com/SolaceTraining/solace-battleship/blob/battleship-lesson-9-implement-match-logic-in-scs/battleship_frontend/src/common/solace-client.ts
I'll let our product team chime in if they have any more details around when/if we're going to add types in the future.
0 -
Thank you!
I will try your code lab course!2 -
That's great @pedroDimas ! Interested to hear your feedback when you go through the codelab and if you have nay further contributions/questions.
0 -
Would be awesome if you can add @types not really typescript at the moment.
Could not find a declaration file for module 'solclientjs'. '.../node_modules/solclientjs/lib/solclientjs-exports.js' implicitly has an 'any' type. Try `npm i --save-dev @types/solclientjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'solclientjs';`ts(7016)
are there any alternatives here ?
0 -
@pedroDimas, @jojojo : You can find the typescript definitions in the samples repo now 👍
0