ts think ctx this等未注入mongo
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.3k
- Forks
- 614
- PR merge metrics
- No merged PRs in 30d
Description
DESC
ENV
OS Platform:
Node.js Version: 8.10.0
ThinkJS Version: 3.2.9
code
import { think } from 'thinkjs';
export default class extends think.Mongo{
async getList() {
return await this.select()
}
}
error message
提示think上不存在Mongo
this上不存在select
使用文档上提到的think ctx等都有同样的提示
当然代码是可以正常工作的
不过这些红杠杠看着很难受
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the editor diagnostics with the JavaScript example showing think.Mongo and this.select as unresolved, then inspect the project's TypeScript declarations and editor-facing type information. Done means the documented ThinkJS context and Mongo APIs no longer show false unresolved warnings while the existing runtime behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100