Giter Club home page Giter Club logo

Comments (7)

timostamm avatar timostamm commented on June 6, 2024

That is certainly possible. We have such an example in the connect-web repository here. Is this what you are looking for, or were you thinking of something different?

We will look into making this example available here as well. Thanks for the feedback!

from examples-es.

timostamm avatar timostamm commented on June 6, 2024

We are tracking this in https://linear.app/bufbuild/issue/TCN-334/add-a-vanilla-typescript-example-to-connect-web-integration

from examples-es.

komuw avatar komuw commented on June 6, 2024

That is certainly possible. We have such an example in the connect-web repository here. Is this what you are looking for, or were you thinking of something different?

We will look into making this example available here as well. Thanks for the feedback!

Thanks. That would be a good start.
Q: that example generates typescript files, is it possible to also generate js instead?

We are tracking this in ...

I don't have access to that link, but I'm subscribed to this github issue and will get notified when it is closed/resolved

from examples-es.

timostamm avatar timostamm commented on June 6, 2024

Q: that example generates typescript files, is it possible to also generate js instead?

Yes, you can simply remove the target plugin option to do so. See here for an explanation of this option.

from examples-es.

smaye81 avatar smaye81 commented on June 6, 2024

@komuw Created an example using just plain JavaScript: https://github.com/bufbuild/connect-web-integration/tree/main/plain

from examples-es.

komuw avatar komuw commented on June 6, 2024

from examples-es.

timostamm avatar timostamm commented on June 6, 2024

that example generates typescript files, is it possible to generate js instead?

Yes, you can simply set the plugin option target=js. See here for an explanation of this option.

TypeScript is a superset of ECMAScript, it simply adds a type system on top of JavaScript. Everything you can do in TypeScript, you can also do in plain JavaScript.

I encourage you to give the example a try! Just change the plugin option to generate JavaScript, and rename index.ts to index.js. You will have to remove a few pieces of TypeScript from index.js so that it becomes valid JavaScript, but I can guarantee you that it works :)

from examples-es.

Related Issues (11)

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.