dthree / dthree/node-piston

TS7016: Could not find a declaration file for module 'piston-client'.

オープン
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
32
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello! Thank you for your work on this module so far!

I'm using the version `1.0.2` of the `piston-client` module for a TypeScript project, and encountered a `TS7016` error:

```
Could not find a declaration file for module 'piston-client'. '/node_modules/piston-client/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/piston-client` if it exists or add a new declaration (.d.ts) file containing `declare module 'piston-client';`ts(7016)
```
I ran `npm i --save-dev @types/piston-client` in case and saw this was not available on `npm` yet:

```
✗ npm i --save-dev @types/piston-client
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@types%2fpiston-client - Not found
npm error 404
npm error 404 '@types/piston-client@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /.npm/_logs/2025-05-29T21_58_33_985Z-debug-0.log
```
I noticed #2 which adds TypeScript support was added 2 years ago, and that the [last publish date](https://www.npmjs.com/package/piston-client?activeTab=versions) for this module was published 4 years. Was the TypeScript updated intended to be published once the above PR was merged? I'm happy to try installing it from the git url from the time being--wanted to call this out in case other devs ran into this issue!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず PR #2 を読み、公開済みの piston-client 1.0.2 パッケージを調査します。特に、その TypeScript サポートが含まれているかを確認してください。小さな TypeScript プロジェクトで TS7016 エラーを再現し、その後、公開済みのパッケージバージョンが必要な宣言を公開し、エラーを発生させなくなっていることを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js, typescript
領域
api, backend, release
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。