SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.18k stars 659 forks source link

Improve types #656

Open wojtek-krysiak opened 3 years ago

wojtek-krysiak commented 3 years ago

Describe the problem feature solves

Right now typescript types are not well designed in multiple places and could be better.

Those are the places:

Describe the solution you'd like

All the types should be improved and also clear to understand from the documentation point of view.

Acceptance criteria

These are the proposed changes:

Acton

PropertyOptions

BasePropertyComponent

ApiClient and ViewHelpers

Merging

This task should be split to smaller chunks and immediately merged to release branch

AshotN commented 2 years ago

I also believe https://github.com/SoftwareBrothers/adminjs/blob/9bb269cab385376525728699f8201cebf0e47bd0/src/adminjs-options.interface.ts#L101 falls into this issue

The usage of | any boils the type down to Array<any>