{"name":"@ts-type/package-dts","version":"3.0.11","keywords":[".d.ts","@types","declaration","definition","dev","develop","development","dts","environment","ide","interface","json","node","package","package.json","playground","runtime","schema","ts","type","type-level","typeing","typelevel","types","typescript","typing","typings"],"author":"","license":"ISC","_id":"@ts-type/package-dts@3.0.11","maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"homepage":"https://github.com/bluelovers/ws-ts-type/tree/master/packages/package-dts#readme","bugs":{"url":"https://github.com/bluelovers/ws-ts-type/issues"},"dist":{"shasum":"b5bf632e79b8bae029bbf1d821a5817d9d1ee146","tarball":"http://registry-npm.ywwl.com/@ts-type/package-dts/download/@ts-type/package-dts-3.0.11.tgz","fileCount":58,"integrity":"sha512-TgcR4e7FYBM6RYN2KZ2DYeZO2QVfJVjdRYKgU7o8FmTI9WO6nrnUW2x1XEl7dRjgDaXhbNHM1505e00c2RdRrQ==","signatures":[{"sig":"MEYCIQCZARL38VQFKd+jH1XxQ67gIBdC7ZRbir7dSg3hLjWFewIhAJJTEm1rqhk44NVZXptq2JerNrkxM8LQ0Y1SbML2nzWG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIDGh7aTVIq9pPHXFnjGg7Zr0nKETQwvho6aTeAnE/cNuAiBbQnagbVd2LoURYPn85g/vg5dKlg5nh6Yhp8x6KtqhwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1981802,"size":181171,"noattachment":false,"key":"/@ts-type/package-dts/-/@ts-type/package-dts-3.0.11.tgz"},"main":"index.js","types":"./index.d.ts","gitHead":"b1febe34d831268743202cf8176775b35ec0bd05","private":false,"scripts":{"ncu":"yarn-tool ncu -u","lint":"eslint **/*.ts","test":"echo pnpm run ts:check","build":"pnpm run update:schema","pretest":"pnpm run build","coverage":"ynpx nyc pnpm run test","posttest":"git commit -m \"build(schema): update schema\" ./types ./schema & echo posttest","test:tsd":"ynpx tsd","ts:check":"tsc --noEmit -p tsconfig.check.json","test:jest":"jest --passWithNoTests","preversion":"pnpm run test","test:snapshot":"pnpm run test","update:schema":"tsx ./script/index","prepublishOnly":"echo prepublishOnly","tsc:showConfig":"ynpx get-current-tsconfig -p","sort-package-json":"yarn-tool sort","test:jest:coverage":"node --run test:jest -- --coverage","test:jest:snapshot":"pnpm run test:jest -u"},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"repository":{"url":"git+https://github.com/bluelovers/ws-ts-type.git","type":"git","directory":"packages/package-dts"},"_npmVersion":"lerna/7.4.2/node@v26.7.0+x64 (win32)","description":"A Typescript type definition for NPM package json","directories":{"test":"test"},"_nodeVersion":"26.7.0","dependencies":{"tslib":"^2.8.1","ts-type":"^3.0.15","@types/semver":"^7.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"json-schema":"^0.4.0","@types/json-schema":"^7.0.15"},"sharedDependencies":{"eslint-config-bluelovers":"latest"},"_npmOperationalInternal":{"tmp":"tmp/package-dts_3.0.11_1790361524155_0.6786420140709253","host":"s3://npm-registry-packages-npm-production"},"readme":"# package-dts\n\nNPM 配置文件（package.json、.eslintrc.json、tsconfig.json、.travis.yml）的 TypeScript 類型定義\n\nTypeScript type definitions for NPM configuration files (package.json, .eslintrc.json, tsconfig.json, .travis.yml)\n\n## 功能特點 / Features\n\n- 完整的 package.json 類型定義\n- Complete package.json type definitions\n- .eslintrc.json 類型定義\n- .eslintrc.json type definitions\n- tsconfig.json 類型定義\n- tsconfig.json type definitions\n- .travis.yml 類型定義\n- .travis.yml type definitions\n- 支援讀取並解析配置檔案\n- Support reading and parsing configuration files\n\n## 安裝 / Install\n\n```bash\nnpm install @ts-type/package-dts\n# or\nyarn add @ts-type/package-dts\n```\n\n## 使用範例 / Usage Example\n\n```typescript\nimport IPackageJson from '@ts-type/package-dts/package-json';\nimport { readPackageJson } from '@ts-type/package-dts';\n\n// 讀取 package.json\nconst pkg = readPackageJson('./package.json');\n\n// 使用類型\nconst name: string = pkg.name;\nconst version: string = pkg.version;\nconst keywords: string[] = pkg.keywords ?? [];\n\n// 驗證類型\nconst devDeps = pkg.devDependencies;\nif (devDeps) {\n    Object.keys(devDeps).forEach(dep => {\n        console.log(`${dep}@${devDeps[dep]}`);\n    });\n}\n```\n\n![image](https://github.com/bluelovers/ws-ts-type/raw/master/packages/package-dts/readme/image.png)\n","publish_time":1790361524238,"_cnpm_publish_time":1790361524238,"dist-tags":{"latest":"3.0.15"}}