wechat-miniprogram / wechat-miniprogram/api-typings

组件属性是自定义的类型该如何定义?

Open
#188 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
803
Forks
117
Avg merge
24m
Merged PRs (30d)
1

Description

例如

Component({
  properties: {
    coupon: CouponBO
  },

我想通过this.properties.coupon获得类型提示,应该怎么写呢?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is identified. Start by locating the TypeScript definitions for Component properties and checking how a custom type such as CouponBO can be represented; done means the supported declaration provides type information for this.properties.coupon.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.