I've been using Raphael with an Angular 4 app and also tried to switch to Snap. Neither of these support typescript very well (at all?).
Does anyone know of a library that includes full typescript types and doesn't require a PhD to get it working with Angular2/4/5?
If not, I'm thinking I will create a pure typescript library but that's a lot of work.
Just install the
@types
package for Raphael.It is maintained by the TypeScript community. These are people who like yourself, write apps in TypeScript and use Raphael.
If you find that the declarations are imperfect, you can open an issue (or a pull request) on https://github.com/DefinitelyTyped/DefinitelyTyped
Installation:
With NPM:
With JSPM:
With Yarn:
Usage:
The same applies to snapsvg