wechat-miniprogram / wechat-miniprogram/api-typings
After passing generics to Component, the methods cannot automatically infer the function types and default to Function
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 803
- Forks
- 117
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
/**
* 页面中参与渲染的数据
*/
type ComponentData = typeof DEFAULT_DATA
/**
* 页面中的方法
*/
interface ComponentMethods extends WechatMiniprogram.Component.MethodOption {}
/**
* 页面的静态实例
*/
interface ComponentInstanceProperty {
$unbindDialog?: WechatMiniprogram.Component.TrivialInstance
}
Component<ComponentData, {}, ComponentMethods, ComponentInstanceProperty, true>
Does the official source have more recommended practices?
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
No repository file or test is named. Start by reproducing the generic Component usage shown in the issue and inspect the relevant TypeScript definitions for method inference. Compare the inferred method types with the expected function types; done means the inference problem or the officially recommended usage is clearly documented or addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100