Skip to content

Typescript or JSDoc #164

@stefnotch

Description

@stefnotch

I used the excellent earcut library, and it was rock solid.

However, once I started looking into porting it to other languages (e.g. C#), I quickly ran into the issue of "wait, what type does this have"?

For example, what type does list have?
https://github.com/mapbox/earcut/blob/afb5797dbf9272661ca4d49ee2e08bd0cd96e1ed/src/earcut.js#L272C30-L272C30
(Spoiler: It's a Node. Not a Node[])

To make porting this library easier, and maybe also to make contributing to this library slightly easier, it would be lovely if we had type annotations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions