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?