warehouse
warehouse copied to clipboard
Better typescript types
Check List
- [X] I have already read README.
- [X] I have already searched existing issues.
- [X] I have already searched existing pull requrests.
Feature Request
There are still some problems with the current type labeling for warehouses. For example: https://github.com/hexojs/warehouse/blob/83df5a1c54fd0d7e3249988dbb4718c6b08120ef/src/types/virtual.ts#L17 Actually, it should be:
get(fn: (this: Document<T>) => any): SchemaTypeVirtual<T> {}
However, it is difficult to refactor the type due to the following implementations: https://github.com/hexojs/warehouse/blob/83df5a1c54fd0d7e3249988dbb4718c6b08120ef/src/document.ts#L19-L23
Additional context
No response