Open slorber opened 5 years ago
Yeah, it'll be so helpful.
So far, only this JS dependencies have no typedefs in my project. And now I'm forced to spend hours to realize how to provide minimal type definitions to make TS compile again.
Maybe I'm missing some easy ways. If so - it will be convenient to have small section in documentation dedicated to TypeScript users.
I'm constantly trying to propagate Elixir/Phoenix to my colleagues and such time wasting points makes evangelism harder.
I am also stuck with typescript errors. Any thoughts about how to get this working with Typescript or any references?
Quick fix:
// @ts-ignore
import X from "y";
It will consider X as any.
I started to integrate subscriptions in a React/TypeScript app and besides the needed packages I installed the types like this:
npm install -D @types/absinthe__socket @types/absinthe__socket-apollo-link @types/phoenix
@eisnstein Those typedefs are flawed. In particular, toObservable
has the wrong return type. The typedef says it returns withAbsintheSocket.Observer
, but the actual implementation returns a zen-observable.Observable
I'm starting the engines again, the idea is to move forward with the following:
Once we get here, it will be easier for people to contribute (TS vs Flow, and PR merged => released).
I will close this issue once we have finished the migration to TS, thanks for the patience.
Asking not out of impatience (really, open source work is hard and I'm very grateful) but for timing – should someone implementing today wait on this (and be okay without types) vs using a fork with types right now?
I'm just looking into setting up semantic release for a forked version we have of this repo and was also thinking it might make sense to migrate to typescript. Using semantic release alongside Renovate should make it pretty low maintenance to keep it up to date.
@mgtitimoli Would you be open to a contribution to set this up?
Hi,
It would be convenient for TS users have type definitions shipped with the packages