question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript definitions

See original GitHub issue

Hi, 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 and typescript-fsa-reducers for the reducer

If you want to include the typings in your project, feel free.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:26
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

9reactions
xdavecommented, Jul 5, 2017

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)

5reactions
rozzzlycommented, Oct 23, 2018

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 in DefinitelyTyped/DefinitelyTyped I won’t even bother, I’ll create a new file in ./type-stubs containing just declare 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 out

That’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.

/ rant

I’ve already written some (rough) type defs for v2 and would be happy to PR them AND keep them updated.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found