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.

Gitter:

@tycho01: afaict, there have not been attempts yet to write up TypeScript definitions for Sanctuary, correct? Has this just not been on the radar so far or might it be problematic with their type system? @davidchambers: More the latter I would say, @tycho01. I don’t think it’s currently possible to express types such as Functor f => (a -> b) -> f a -> f b in TypeScript. That said, @gcanti is doing things with Flow in https://github.com/gcanti/flow-static-land that I didn’t think possible, so there’s hope. 😃

I was thinking it might be useful to put this out here, so we could consolidate questions/issues and perhaps check for solutions with the TS/flow team.

Potentially relevant (TS):

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:18
  • Comments:45 (12 by maintainers)

github_iconTop GitHub Comments

10reactions
gcanticommented, Nov 18, 2016

Hi all,

I wrote a first draft of the definition file for Flow, you can find it here.

Contributions, tests and PRs are warmly welcomed.

7reactions
ikatyangcommented, Jul 31, 2017

Looks like you need some tools to test types:

  • run typescript compiler directly
    • impossible to write failing tests
  • dts-lint (DT tests this way)
    • behave as linter rule
    • failing tests avaliable ($ExpectType type, $ExpectError ErrorMessage)
  • typings-checker
    • one time test, output results
    • failing tests avaliable ($ExpectType type, $ExpectError ErrorMessage)
  • dts-jest
    • watching mode avaliable, using snapshot testing from jest
    • failing tests avaliable (@dts-jest:pass, @dts-jest:fail)
    • actual tests avaliable (//=> value)
    • can generate diff-friendly file for comparing
Read more comments on GitHub >

github_iconTop Results From Across the Web

@lynxwall/cucumber-tsflow - npm
Provides 'specflow' like bindings for CucumberJS 8.5.0+ in TypeScript 1.7+.. Latest version: 5.1.3, last published: 14 days ago.
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 >
How do I generate .d.ts typings from Flow code?
I searched for the available tools. I found the following. The first one is the most up to date one. It can convert...
Read more >
Protractor e2e testing with Gherkin, CucumberJS, Typescript.
npm i chai cucumber cucumber-tsflow gulp gulp-clean ... protractor protractor-cucumber-framework require-dir typings --save-dev.
Read more >
cucumber-tsflow, angular automation with protractor + typescript + ...
cucumber-tsflow uses TypeScript Decorators to create SpecFlow like bindings ... tsd install selenium-webdriver /// <reference path="typings/node/node.d.ts" ...
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