wechat-miniprogram / wechat-miniprogram/api-typings

TS类型定义错误

Open
#344 0 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

Tensors类型定义如下:
Image
官网中的示例在编辑器中报错

Image 定义需改为
interface Tensors {
    [key: string]: Tensor
}

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

The issue shows the incorrect Tensors type definition and the proposed replacement. Find the Tensors declaration in the TypeScript API typings, update it to match the reported shape, and verify that the official example no longer reports an editor type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.