I’m working on a client library in Typescript that’s a re-implementation and extension of another client library. The reason for this is so the client library can be licensed the same as the rest of the project (MIT) since the original library is AGPL. I’m good with that part, and it’s just background info.

The question I have is how to handle the type declarations. In order to be a drop-in replacement, the client code would expect the library’s exported types and their names to be the same.

I know header files are considered non-copyright-able (Oracle v Google), so it seems to me that the type declarations would also fall under that umbrella. I’ve not found anything definitive (yet) that covers those, but they seem analogous.

Is that a safe assumption?

  • Admiral Patrick@dubvee.orgOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    Thanks.

    As for the typedef, it’s most likely considered a public definition document.

    That was my take on it as well, but haven’t been able to find any official word. For the other point, I’ll raise it with the project maintainer, but I think our solution should be fine - there’s only so many ways to call an API, and we’ve implemented the mechanics completely differently