wechat-miniprogram / wechat-miniprogram/api-typings
Component.Instance、Component.Options 第四个范型参数 TBehavior 能否是可选的
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 803
- Forks
- 117
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
更新至4.0后,发现必须填第四个参数,但是并非所有组件都有 behavior,而且也不向下兼容了
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
Start by locating the TypeScript declarations for Component.Instance and Component.Options and inspect how their fourth generic parameter, TBehavior, is defined in the 4.0 typings. Check existing usages without a behavior type and verify that the declarations type-check with that parameter omitted while behavior-enabled components still retain their typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100