fetch-npm-types
Retrieve TypeScript type definitions for specified NPM packages, sourced either from the main package or @types/. Supports version and search mode customization for precise type retrieval.
Instructions
指定されたNPMパッケージのTypeScript型定義を取得します。メインパッケージの型定義または@types/パッケージから取得します。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
packageName | Yes | NPMパッケージ名(例: 'express', 'react') | |
searchMode | No | 検索モード: 'main'=メインパッケージのみ, 'types-package'=@types/パッケージのみ, 'search'=両方を検索 | main |
version | No | バージョン(デフォルト: 'latest') | latest |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"packageName": {
"description": "NPMパッケージ名(例: 'express', 'react')",
"type": "string"
},
"searchMode": {
"default": "main",
"description": "検索モード: 'main'=メインパッケージのみ, 'types-package'=@types/パッケージのみ, 'search'=両方を検索",
"enum": [
"main",
"types-package",
"search"
],
"type": "string"
},
"version": {
"default": "latest",
"description": "バージョン(デフォルト: 'latest')",
"type": "string"
}
},
"required": [
"packageName"
],
"type": "object"
}