rosbag.js icon indicating copy to clipboard operation
rosbag.js copied to clipboard

typescript support

Open yokyj opened this issue 6 years ago • 5 comments

would you add a d.ts file to this project?

yokyj avatar Mar 08 '19 07:03 yokyj

Hey @yokyj thanks for the question! We could add a .d.ts file to this project...but I thought the normal approach was to add type definitions to DefinitelyTyped for projects that aren't written in TypeScript? If you write the .d.ts & submit a pull request we'll happily add it here; just not sure if it should go over on the DefinitelyTyped repo instead? We don't use TypeScript + rosbag.js currently (a lot of our stuff is written with Flow) so we don't have any resources to maintain the type definitions at the current time, but we are always happy to review & integrate pull requests into the repo & package!

brianc avatar Mar 08 '19 22:03 brianc

the normal approach was to add type definitions to DefinitelyTyped for projects that aren't written in TypeScript

+1. TypeScript support should probably be decoupled from the JavaScript source code. Keeping the .d.ts file in the same repository might seem handy, but as Brian mentioned, it does not make sense since TypeScript is not part of native JS.

kejxu avatar Jul 16 '19 19:07 kejxu

Hello guys, I have created a pull request to DefinitelyTyped. Please have a look.

naeemy avatar Aug 29 '21 11:08 naeemy

It's available as npm package

naeemy avatar Aug 30 '21 10:08 naeemy

FYI the @foxglove/rosbag package has full TypeScript support.

jtbandes avatar Dec 02 '21 23:12 jtbandes