Giter Site home page Giter Site logo

Add Typescript Support about spiderfire HOT 9 OPEN

redfire75369 avatar redfire75369 commented on May 25, 2024 2
Add Typescript Support

from spiderfire.

Comments (9)

gimbling-away avatar gimbling-away commented on May 25, 2024 1

I can make a PR for this with some guidance, if you would like.

from spiderfire.

Redfire75369 avatar Redfire75369 commented on May 25, 2024

For this, we should probably use swc to transpile the TypeScript to JavaScript.
In order to prevent unnecessary transpilation, the SHA of the TS file and the transpiled JS need to cached somewhere.

from spiderfire.

sagudev avatar sagudev commented on May 25, 2024

And the next logical step would be to provide ts definitions of spiderfire functions.

from spiderfire.

Redfire75369 avatar Redfire75369 commented on May 25, 2024

All modules already have TypeScript (and Flow) definitions created, I think it's mostly a matter of integrating those into IDEs and stuff.

from spiderfire.

sagudev avatar sagudev commented on May 25, 2024

Yes, I totally forgot it.

from spiderfire.

sagudev avatar sagudev commented on May 25, 2024

Maybe swc-project/swc for bundling TS compiler within?

from spiderfire.

Redfire75369 avatar Redfire75369 commented on May 25, 2024

That's the plan for the future, it's just that I don't want to deal with caching, which is going to be almost certainly required.

from spiderfire.

Redfire75369 avatar Redfire75369 commented on May 25, 2024

I completely forgot about mentioning this here, but until full support is added, I've moved all TypeScript (and Flow) bindings to a seperate folder (00c02d4). This will be published as a zip file in each prerelease.

Bindings: https://github.com/Redfire75369/spiderfire/tree/master/bindings

from spiderfire.

Redfire75369 avatar Redfire75369 commented on May 25, 2024

As of 9e05f8c, typescript support has been added! You'll still need the global declaration files for your IDE but this is a good step forward. There's also no support for something like tsconfig.json or .swcrc for now, that will be added later,
The latest prerelease with support for TypeScript was also released.

from spiderfire.

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.