autobahn-js icon indicating copy to clipboard operation
autobahn-js copied to clipboard

Bundled and native support for Typescript

Open oberstet opened this issue 7 years ago • 3 comments

There is Typescript support for Autobahn via https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/autobahn

We should

  • check if that is current vs the latest Autobahn
  • add some basic examples and docs

oberstet avatar Feb 16 '17 09:02 oberstet

The right link https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/autobahn

karser avatar Apr 12 '17 10:04 karser

From my perpsective and real-world experience, as JS apps move into higher LoC and developer numbers, the (unfixable) defects of JS as a language become more apparant. And this can become a productivity issue as the code base becomes more brittle when growing and aging.

Up to now, I've only done some casual reading on Typescript, but what I've read in docs and example code looks really like a big step forward, while preserving all the functionality and native access to the browser as the most powerful frontend run-time. Anyway, I really would move to first-class support in AutobahnJS for Typescript.

And here is the point: how would "first-class support" look like?

After looking a bit into the type definitions in the DefinitelyTyped project repo for AutobahnJS, the https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/autobahn/index.d.ts#L1 is actually really comprehensive and nice already. So I think we should probably just contribute there via PRs as this is also MIT licensed anyways.

There are a couple of minor thing, as it is currently at v0.9.7, and there have been some options been added since then (current version of being 0.12.0), but it is more here and there, nothing big.

The other thing are the unit tests. Or the unit test;) The unit being the whole thing (AutobahnJS as wrapped via the interface and used from Typescript).

So there the room here, and we probably want to test the whole API surface of AutobahnJS at the current JS flavor here, and the Typescript one. So we need to be able to trigger tests over the whole surface. Mmh.

oberstet avatar Apr 20 '17 18:04 oberstet

Hi, are the types still valid? They didn't had an update in 2 years

SrZorro avatar Apr 15 '21 18:04 SrZorro