TypeScript Error: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
未关闭
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 11
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
You're missing a declare statement before the class Client_Libsql extends Knex.Client {} declaration in index.d.ts declaration file.
It's causing errors in my application when tsc attempts to transpile it.
I'm not going to set tsconfig.json skipLibCheck to true, which I've seen others suggest, since I need my declaration files to be validated during build and that option disables checking of those files.
Thank you,
Scott
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 index.d.ts,检查 tsc 报告的顶层 Client_Libsql 声明。使用 TypeScript 验证该声明,但不要启用 tsconfig.json 的 skipLibCheck 选项;当报告的修饰符错误消失,同时声明文件仍会被检查时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100