TypeScript definitions
See original GitHub issueHi, just wanted to stop by and leave a comment to tell you how awesome I think this package is. I’ve been messing around with it, and decided to try doing something with it with typescript and redux.
I’ve pushed ink-typescript-redux-test which is essentially the Counter example, but with more awesomeness.
- I’ve created a basic typescript definition for ink, contained in the
custom_typings/ink
directory. - Uses redux for state
- Uses
typescript-fsa
for action creators andtypescript-fsa-reducers
for the reducer
If you want to include the typings in your project, feel free.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:26
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Documentation - Type Declarations - TypeScript
Built-in Type Definitions. TypeScript includes declaration files for all of the standardized built-in APIs available in JavaScript runtimes.
Read more >The repository for high quality TypeScript type definitions.
The repository for high quality TypeScript type definitions. - GitHub - DefinitelyTyped/DefinitelyTyped: The repository for high quality TypeScript type ...
Read more >Surviving the TypeScript Ecosystem — Part 4 - Medium
The solution is to make a type definition file. A type definition file is a file that ends in “.d.ts”. It is a...
Read more >TypeScript Definitions | Developer's Guide - GrapeCity
Hence, all the DataViewsJS packages on npm include TypeScript definitions. These TypeScript declaration (d.ts) files provide the type checking and ...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
Does Typescript type safety necessarily mean more ceremony when writing code? What are the multiple types of Typescript Type Definitions? How do ...
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
Yeah, no problem! Drop me a line if you want help with it, or if you want to write the whole thing in Typescript (which would eliminate the need to maintain separate bindings 😃, lol)
If I’m working with
some-pkg
and notice that its’ type defs are outdated, I’ll usually try to fix them. However, if the typedefs are provided by@types/some-pkg
which means the definitions are stored inDefinitelyTyped/DefinitelyTyped
I won’t even bother, I’ll create a new file in./type-stubs
containing justdeclare module 'some-pkg';
and say f🎉ck it. Because a) that repo won’t even load in my browser because there’s so many files in it b) the people there are snobby about writing tests even for minor changes c) the issues/PR sections have issues/PRs from thousands of other packages and my changes get drowned outThat’s why I prefer typedefs be kept in the same repo as the projects source. If I PR a change, somebody will (usually) merge it pretty quickly.
I’ve already written some (rough) type defs for v2 and would be happy to PR them AND keep them updated.