# Solace in typescript on node server

**URL:** <https://community.solace.com/t/solace-in-typescript-on-node-server/1008>\
**Category:** General Discussions\
**Tags:** failover, typescript, ccsmp\
**Created:** [October 30, 2021, 4:45am UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008 "2021-10-30T04:45:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jojojo](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jojojo](https://community.solace.com/u/jojojo)\
**Post date:** [October 30, 2021, 4:45am UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/1 "2021-10-30T04:45:24Z")

</div>

Hi we’ve implemented a solace topic subscriber on our node server with solclientjs.

We currently working with requiring a js module to handle all the solace stuff and that works. But we’re looking to update this to tyoescript.

Would be awesome if you can add @types not really typescript at the moment.

```auto
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 ?

Another quick thing if you’re reading this… Are there anyway to implement failover URLs for solclientjs.

I know other java services currently listing on the same pubsub are connecting by something like this

```auto
solacehost : url1;url2

```

Are there any alternatives for solclientjs here ?

---

<div class="post-metadata">

**Author:** ![amackenzie](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/amackenzie/32/1168_2.png) [@amackenzie](https://community.solace.com/u/amackenzie)\
**Post date:** [October 30, 2021, 11:17am UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/2 "2021-10-30T11:17:22Z")

</div>

Hi,  
We are working on TypeScript types declaration for SolClientJS and you should be seeing something in the next couple of weeks (possibly sooner).

As for connecting to a hostlist for failover, the `solace.SessionProperties.url` property can take and array of urls.

---

<div class="post-metadata">

**Author:** ![jojojo](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jojojo](https://community.solace.com/u/jojojo)\
**Post date:** [November 1, 2021, 7:55am UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/3 "2021-11-01T07:55:53Z")

</div>

Amazing! Really looking forward to having this typed 😃 Thanks for the info regarding array or urls.  
I will try that out and get back to you! 🙂

---

<div class="post-metadata">

**Author:** ![Tamimi](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/tamimi/32/2190_2.png) [@Tamimi](https://community.solace.com/u/Tamimi)\
**Post date:** [November 2, 2021, 4:27pm UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/4 "2021-11-02T16:27:57Z")

</div>

@jojojo let us know if this works! I’m yet to try it and would like to know how you implemented it ?

---

<div class="post-metadata">

**Author:** ![jojojo](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jojojo](https://community.solace.com/u/jojojo)\
**Post date:** [November 2, 2021, 4:40pm UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/5 "2021-11-02T16:40:36Z")

</div>

Is it available now?

---

<div class="post-metadata">

**Author:** ![amackenzie](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/amackenzie/32/1168_2.png) [@amackenzie](https://community.solace.com/u/amackenzie)\
**Post date:** [November 2, 2021, 4:44pm UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/6 "2021-11-02T16:44:40Z")

</div>

It will be available in the next week or so. We are just finalizing.

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [January 31, 2022, 4:48am UTC](https://community.solace.com/t/solace-in-typescript-on-node-server/1008/7 "2022-01-31T04:48:01Z")

</div>

Hi @jojojo , and anyone else that stumbles onto this thread… Typescript definitions are now available (have been for a couple months). There is an `index.d.ts` definitions file included with the tarball you can download from the Solace website, or also on our GitHub samples pages. Details:  
[Do you use TypeScript? — Solace Community](https://community.solace.com/discussion/1158/do-you-use-typescript)[https://solace.com/downloads/?fwp\_downloads=solace-apis](https://solace.com/downloads/?fwp_downloads=solace-apis)[GitHub - SolaceSamples/solace-samples-nodejs: Getting Started Samples for the Solace Node.js API.](https://github.com/SolaceSamples/solace-samples-nodejs)[GitHub - SolaceSamples/solace-samples-javascript: Getting Started Samples for the Solace JavaScript API.](https://github.com/SolaceSamples/solace-samples-javascript)
