Giter Club home page Giter Club logo

Comments (6)

Jackman3005 avatar Jackman3005 commented on July 26, 2024 2

Typescript support is incredibly minimal. It would be really nice if we had types for things that are already well documented. Like traits and context for starters.

Is there a reason why the types are not included in the library by default? This has become commonplace for most modern libraries and even benefits Javascript code bases since most IDEs will still use type information for context tips/autocomplete. When the types and js code are in separate libraries it adds the hassle of ensuring that the type library version is for the same version of code in the Javascript library.

We're trying out Segment and having to switch clients from Amplitude to Segment and the developer experience in this space is much better from Amplitude.

from analytics-node.

silesky avatar silesky commented on July 26, 2024 2

@agyimr @yujidude @Jackman3005

Types are still a WIP (I am currently working on improving our current Context and Traits type FYI, see this PR), but if you or anyone in this issue is interested, I'd like to invite you guys to try out the analytics.js typescript SDK (BETA), written 100% in typescript. If you use the new SDK and have feedback, please leave it in the analytics-next repo, rather than this one.

from analytics-node.

yujidude avatar yujidude commented on July 26, 2024 1

The TypeScript definition in the DefinitelyTyped project is either currently (or originally) for analytics-node 3.1 which may have resulted in some of your issues @agyimr. Given that the project is already following JSDoc for documentation it might make sense to generate .d.ts files directly to avoid maintaining multiple sets of documentation.

More information on generation can be found here: https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html

from analytics-node.

edsonjab avatar edsonjab commented on July 26, 2024

Hi @agyimr thanks for your report, we start looking into this

from analytics-node.

Jackman3005 avatar Jackman3005 commented on July 26, 2024

@silesky thanks for getting back to us. Will take a look at the PR and the new TS library.

Is the new library where most of the energy is going for Segment? I've noticed some other issues getting lackluster response in this repo, hopefully the next iteration brings nice improvements.

Cheers,
Jack

from analytics-node.

silesky avatar silesky commented on July 26, 2024

@Jackman3005 Correct. As far as I'm aware, no new features are going to be added to this library (barring security vulnerabilities, etc), and it will be deprecated as soon as the new library goes into GA.

There are already significant improvements to the lib in the new SDK (mainly, graceful shutdown and the fixing of long-standing bugs), and, while it hasn't had an official release, I would recommend using our beta over this library today.

I am sorry you had to deal with poor responsiveness in this repo -- for historical reasons, this library was not build or managed 'in-house'. I think you'll find much better responsiveness once all activity / issues are confined to the analytics-next monorepo, as our full-time team is generally quite quick when it comes to triaging issues, especially when it comes to critical behavior.

from analytics-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.