Giter Site home page Giter Site logo

TypeScript support? about derby HOT 3 CLOSED

IAkumaI avatar IAkumaI commented on June 1, 2024
TypeScript support?

from derby.

Comments (3)

ericyhwang avatar ericyhwang commented on June 1, 2024 4

It turns out, the trickier part of adding type definitions is the Racer Model, not Derby itself. But a lot Derby depends on Racer, so the Racer types need to be done first.

I did an initial pass at types for the Model in a fork:
https://github.com/lever/racer/blob/2eaec051b753d5793494ed7e3239bfef7d5cf6f7/lib/index.d.ts

Then, I decided that developing types in a private repo would allow for faster iteration, without worrying about breaking other people.

The private definitions are reasonably stable now, and I do want to open-source them. But I'll need to schedule some time with Nate to go over them.

from derby.

cray0000 avatar cray0000 commented on June 1, 2024

Hi @ericyhwang ! I looked at the code you have in the typescript* branches of the lever/racer fork and the progress you made there is just wonderful!

From the recent addition of multi-argument support to the model.at/model.scope it seems that you even figured out the way to get data-driven types without need to explicitly pass the generic type with each getter call 🔥

Is it possible to get the sneak peek of your latest typescript-friendly version of racer? Even if it has breaking changes I would really love to test it out on one of our production codebases and contribute to polishing it for the prime time.

from derby.

craigbeck avatar craigbeck commented on June 1, 2024

Derby v4 and Racer v2 now both in typescript and published with typedefs.

from derby.

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.