Credentials并未导出,typescript下无法通过编译
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 590
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
使用环境:
node.js, 使用了NODE.JS SDK,版本 7.2.2
sdk 安装方式:
yarn add qiniu
以下代码是typescript代码
import * as qiniu from 'qiniu'
const qiniu_credentials = new qiniu.Credentials(qiniu_ak, qiniu_sk)
提示:
Property 'Credentials' does not exist on type 'typeof import("/xxxx/node_modules/qiniu/index")'
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 from the qiniu package entry point used by the import * as qiniu from 'qiniu' example and inspect how its TypeScript declarations expose Credentials. Reproduce the compiler error with the provided snippet; done means new qiniu.Credentials(qiniu_ak, qiniu_sk) compiles successfully for SDK version 7.2.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, developer-experience
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100