Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide TS typedefs #43

Open
slorber opened this issue Nov 12, 2019 · 9 comments
Open

Provide TS typedefs #43

slorber opened this issue Nov 12, 2019 · 9 comments

Comments

@slorber
Copy link

slorber commented Nov 12, 2019

Hi,

It would be convenient for TS users have type definitions shipped with the packages

@ffloyd
Copy link

ffloyd commented Jan 6, 2020

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.

@kurund
Copy link

kurund commented Jun 15, 2020

I am also stuck with typescript errors. Any thoughts about how to get this working with Typescript or any references?

@slorber
Copy link
Author

slorber commented Jun 16, 2020

Quick fix:

// @ts-ignore
import X from "y";

It will consider X as any.

@eisnstein
Copy link

eisnstein commented Aug 10, 2020

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

@jamestalmage
Copy link

jamestalmage commented Oct 30, 2020

@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

@mgtitimoli
Copy link
Member

I'm starting the engines again, the idea is to move forward with the following:

  1. Automate release process
  2. Migrate to TS / Upgrade deps

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.

@joshsmith
Copy link

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?

@davidspek
Copy link

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?

@davidspek
Copy link

@joshsmith The repo is still a bit messy from me trying to get the release process working but in this fork I've setup Semantic Release and NX so that new release are created for every PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants