GithubHelp home page GithubHelp logo

Comments (4)

nrabinowitz avatar nrabinowitz commented on July 21, 2024 1

Good idea, I can add this pretty quickly. I think it makes more sense in output than input - partly because requiring tuples in input can lead to annoying type errors, and partly because e.g. polygonToCells might use GeoJSON as input, which can technically include a third element in coords for altitude (though the H3 library would ignore it at present).

from h3-js.

nrabinowitz avatar nrabinowitz commented on July 21, 2024 1

...I took a quick swing at this, and ran into the same issue noted in the discussion you linked. The problem is, JSDoc doesn't technically support tuples, leading tsd-jsdoc to fail when trying to parse them, so we can't easily support tuples unless we switch from auto-generating types with tsd-jsdoc to another approach (hand-crafting the libdef, or converting the underlying code to TS and generating the libdef from there). I'll take a quick look to see if there's an alternative generated solution here, but otherwise I'm less willing to change the whole type generation approach to fix this issue - sorry about that.

from h3-js.

boredland avatar boredland commented on July 21, 2024

converting the underlying code to TS

Would such a change be something we could do? I'd be in for it.

from h3-js.

nrabinowitz avatar nrabinowitz commented on July 21, 2024

converting the underlying code to TS

Would such a change be something we could do? I'd be in for it.

I have an alternate option here (#153) generating the .d.ts files with TS. It's a little awkward but solves this issue. Converting to TS should be feasible, but I think it would require re-engineering the build, which could be a pain. I'd be open to PRs for this, as long as they create all the same bundles we do now.

from h3-js.

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.