0
$\begingroup$

I found this repo containing type definitions and want to know if this is all I'll need for ensuring compatibility with Angular. Does anybody here have experience with using robot web tools with TypeScript?

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/roslib

$\endgroup$
6
  • $\begingroup$ Does Angular require types? $\endgroup$ Commented Jun 13 at 14:59
  • $\begingroup$ Yes, Angular is built on TypeScript and requires type definitions. I'm hoping that the repo I linked is enough to bridge the gap between roslib and Angular without having to go in and edit the common JS to reflect typing. $\endgroup$
    – Aibaahl
    Commented Jun 13 at 16:08
  • $\begingroup$ Are you sure you can't tell Angular to relax a little about types? Normally in typescript you can allow implicit "any", and also just allow JavaScript. Does Angular use a tsconfig.json? $\endgroup$ Commented Jun 13 at 19:07
  • 1
    $\begingroup$ It does use a tsconfig.json file, and one is included in that repo as well. Do you think changing the noImplicitAny value to true would take care of that? $\endgroup$
    – Aibaahl
    Commented Jun 14 at 15:02
  • $\begingroup$ it should! I would also set "allowJs": true. $\endgroup$ Commented Jun 14 at 15:21

1 Answer 1

0
$\begingroup$

Just recording the resolution here from the comments.

Update your tsconfig.json and set:

"allowJs": true,
"noImplicitAny": false,
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.