ForestAdmin / forest-express-sequelize

🌱 Express/Sequelize agent for Forest Admin to integrate directly to your existing Express/Sequelize backend application.
https://www.forestadmin.com
GNU General Public License v3.0
191 stars 47 forks source link

The LianaOption "expressParentApp" is not described in the library's types #1084

Open vinassefranche opened 1 year ago

vinassefranche commented 1 year ago

Expected behavior

I would like to be able to set the expressParentApp option when I call the init function without TypeScript telling me: Object literal may only specify known properties, and 'expressParentApp' does not exist in type 'LianaOptions'.

Actual behavior

TypeScript tells me: Object literal may only specify known properties, and 'expressParentApp' does not exist in type 'LianaOptions'.

Failure Logs

N/A

Context

TODO: Please provide any relevant information about your setup.

Thenkei commented 1 year ago

I just check and you are right. We export type through a public repository Definitely Typed It is a project that provides a central repository of TypeScript definitions for NPM packages which do not have types like this one. You can open a Pull Request on this repository to contribute to our project if you wish. 🙏

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/57b1cd2e7aef45d6ca5cb8e0fad99e445bd581c6/types/forest-express-sequelize/index.d.ts#L4

vinassefranche commented 1 year ago

Hi @Thenkei !

I'm perfectly ok with opening a P.R. for this.

However, the types I see in my code base are the ones from this repository (this file) so doing a P.R. on DefinitelyTyped would not fix my issue.

I'm a bit surprised that you are maintaining the types (with some differences) there and in this repository. Any reason for that? To me, as long as you have the types in the main repository, it's useless to have the DefinitelyTyped ones.

I can also open a P.R. on both repositories if you think I should.

Thanks for your answers anyway!