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.

DefinitelyTyped Bacon.js

See original GitHub issue

Good day!

As a big fan of Bacon, I recently started to cook a TypeScript definition file for the library.

The method was to go through the API Reference and extract the typings from there. However, I’ve encountered a significant problem of differentiating between Observable, EventStream and Property, for example, in Common methods in EventStreams and Properties, what started as

interface Observable<A> {
  map<B>(f:(value:A) => B): Observable<B>;
}

has turned to

interface EventStream<A> {
  map<B>(f:(value:A) => B): EventStream<B>;
}

interface Property<A> {
  map<B>(f:(value:A) => B): Property<B>;
}
What I want to achieve
  1. A typesafe definition for Bacon.js (resolving the kind of problems described above);
  2. A comprehensive documentation for the library. Primarily for intellisense, but the possibility of JSDoc autogen is attactive as well.
What kind of help I’d be grateful to get

I would much appreciate a person with an familiarity with the library helping me figuring out the typings. Also, I think I’ve messed up some of the JSDoc syntax, would be nice to fix it.

The result

After achieving the above-mentioned goals, I’ll push the definition to the official repo.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
alexander-matsievskycommented, Mar 19, 2019

@fatso83 Nice seeing the library which introduced me to FRP evolving+) IIRC I wrote these definitions for v0.7.77.

Read more comments on GitHub >

github_iconTop Results From Across the Web

baconjs/bacon.js: Functional reactive programming ... - GitHub
A functional reactive programming lib for TypeScript JavaScript, written in TypeScript. Turns your event spaghetti into clean and declarative feng shui bacon, ...
Read more >
@types/baconjs - npm
Stub TypeScript definitions entry for baconjs, which provides its own types ... This package contains type definitions for Bacon.js 0.7.0.
Read more >
bacon.js - Where to get latest typescript type definition for baconjs ...
DefinitelyTyped is the repo for common typings and the typings are included ... Bacon.js 3 has been rewritten in TypeScript, so now TypeScript...
Read more >
@ryancavanaugh/baconjs CDN by jsDelivr - A CDN for npm and ...
A free, fast, and reliable CDN for @ryancavanaugh/baconjs. Type definitions for Bacon.js 0.7.0 from https://www.github.com/DefinitelyTyped/DefinitelyTyped.
Read more >
Bacon.js - Functional Reactive Programming library for ...
Why Bacon? Contribute. Function index. Toggle type signatures. Bacon.js. A small functional reactive programming lib for JavaScript. Turns your event spaghetti ...
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