Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TypeScript used to work -- what happened?

I wrote a clock face back in the SDK 1.0 days. The project was in TypeScript and done within Studio. When I came back to the project many months later, it no longer compiled. I read that TypeScript wasn't supported by Studio, which surprised me given that the clock face was done in Studio, is in the store, and works. Can anyone say why TS used to work and why that support, even if partial, was removed from Studio?

 

Does anyone know the simplest way to take an existing SDK 1.0 TypeScript project from Studio and bring it in to the current world, without dropping all of the typing to turn it in to a plain JavaScript project? (I have VS2019 Enterprise installed on my laptop, if that will help.)

Best Answer
0 Votes
2 REPLIES 2

As part of SDK 2.0 and the CLI SDK we rewrote the toolchain and changed the way it integrates into Studio. Since it isn't officially supported/tested, something during that transition likely broke your project.

 

If you can share code, I could take a look and say what specifically broke.

 

You can use TypeScript, but you'll need to provide your own SDK typings. There's an unofficial set here: https://github.com/SergioMorchon/fitbit-sdk-types

Best Answer
0 Votes

Thanks for the explanation, Liam. I'll give Sergio's types a try, but likely not until the next weekend. 

 

This is a link to the last working TS version of the project: https://1drv.ms/u/s!AsHn68EkYM1S8vcW4oKSP5OZt0qhsA

Best Answer
0 Votes