acl-services / acl-services/paprika

ListBox: typings don't work for ListBox.types

未關閉
#986 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Low Priority ↓
主要語言
JavaScript
星號
54
分支
10
平均合併
1 天 12 小時
30 天內合併 PR
6

描述

# Bug Report

## Expected behavior
I want to be able to refer to `ListBox.types` in TypeScript code.

## Current behavior
I'm getting a tsc error
```
Property 'types' does not exist on type 'typeof ListBox'. ts(2339)
```

## Screenshots / Gifs / Codepens
![image](https://user-images.githubusercontent.com/93752/112401489-dd0e1400-8cc7-11eb-84f8-31cf0b15e407.png)

## Additional context
It starts working when I rename this to `ListBox`:
https://github.com/acl-services/paprika/blob/992fb921d680b4ddcd028f867791df0cf334cca1/packages/ListBox/src/index.d.ts#L190

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Open `packages/ListBox/src/index.d.ts` at the linked area (`.../index.d.ts#L190`) and inspect how `ListBox` is typed, especially static members on `typeof ListBox`. Confirm whether `types` is missing from that declaration compared with the runtime API. Then run the package’s TypeScript type check/build (`tsc` or equivalent) and verify the consumer error `Property 'types' does not exist on type 'typeof ListBox'` is gone.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
react, typescript
領域
frontend
Issue 類型
缺陷
難度
1/5
預估耗時
1 小時以內
活躍度
停滯
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。