hexojs / hexojs/warehouse

Better typescript types

Open
#252 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
206
Forks
22
PR merge metrics
No merged PRs in 30d

Description

### 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:
```ts
get(fn: (this: Document) => any): SchemaTypeVirtual {}
```
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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.