Type definitions for @garmin/fitsdk (TypeScript or JSDoc)

Are there any plans on including the type definitions for @garmin/fitsdk? We use Typescript for development and would love to have the type definitions to support our developers. This would be valuable not only for TypeScript projects out there but also JavaScript projects relying on JSDoc.

See DefinitelyTyped.

  • Currently there are no plans to add type definitions to the FIT JavaScript SDK. That is not to say it never will happen. At the present time, the methods in the Decoder and Stream classes that are the public interface to the SDK have JSDoc comments. But I am guessing that you are after type definitions for the messages, fields, and enums.

    In the JavaScript SDK the file profile.js is generated from config files that contain the definitions for all of the messages, fields, and enums. Generating a fit.d.ts file and adding it to the package would be possible.