Typescript/Flow support
See original GitHub issueAfter having used this tool for a bit, I’m starting to really miss the type-safety I’m used to on other projects.
I definitely think the default should be vanilla JS, since it’s much more familiar and lower-friction, but I wonder if it’d be worth setting it up to transpile Typescript or Flow? I think ideally, the user experience wouldn’t change at all, except for it processing .ts files as well as .js.
(I’ve actually never used Typescript, I’ve used Flow extensively… but TS is much more popular than Flow, so it probably makes more sense to focus on that)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Flow: A Static Type Checker for JavaScript
And Flow can help you understand the code you wrote six months ago. ... Using data flow analysis, Flow infers types and tracks...
Read more >Support for TypeScript definition files · Issue #7 · facebook/flow
Flow supports modules organized following the CommonJS / Node.js specification.
Read more >Typescript vs Flow. Which static type checker should you use ...
Both Flow and TypeScript have support from IDEs like Visual Studio Code and Sublime. This means that developers get functionality like ...
Read more >TypeScript VS Flow: Type Checking Front End JavaScript
TypeScript VS Flow: Syntax, IDE support, framework support, and roadmaps. JavaScript is a dynamically typed programming language.
Read more >Comparing statically typed JavaScript implementations
In this post, we'll compare three of the most popular ways of imposing static typing on JavaScript: TypeScript, Flow, and PropTypes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve just been looking into integrating TypeScript with canvas-sketch in a React project of mine. I’ve created a Wrapper component and have documented the types myself for now based on the documentation: https://gist.github.com/neefrehman/eb94d76e3bfd7e562d9f01fbebb97e19
Having access to up-to-date typings for the library would be super useful, would there be a simple way to generate and publish them to
@types/canvas-sketch?@mattdesl I tried my hand at typing the basics (RendererObjects & SketchManager excluded): https://github.com/mattdesl/canvas-sketch/pull/103
Usage example: