{"name":"@ts-type/package-dts","version":"3.0.12","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.12","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":"00cc1e823e13bae6b293d049845c99b83c4a7ea3","tarball":"http://registry-npm.ywwl.com/@ts-type/package-dts/download/@ts-type/package-dts-3.0.12.tgz","fileCount":58,"integrity":"sha512-dsKGarSXKt4HOOIHB07XMxSo5qyKFURq1jgWLOSaxhb19Nt/umWN0+Ly99fybN39xSUAmg8XYNrAtxLfl5XW9A==","signatures":[{"sig":"MEUCIQDpIR2kCnRY9QL3AAZdv0k9/rvgP3Hu9O+XZDK4mn13SAIgZlK9YxiJz7Ayx5V14fDGy1tWRzTzeVj5P6sgJMOslnE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCt/JnIIouKJZH7TMWk+rfWvLZVsVKUNX7NvcotoRF/bAIgTH3ScMupcMYmkxRQWv1gEImY2+fvym4rjQ5fa1CnDKw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1982002,"size":181199,"noattachment":false,"key":"/@ts-type/package-dts/-/@ts-type/package-dts-3.0.12.tgz"},"main":"index.js","types":"./index.d.ts","gitHead":"6411b1f4cf689345537ab348e19e7e7dfd3bdfef","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.16","@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.12_1790533411749_0.8089903116996497","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":1790533411837,"_cnpm_publish_time":1790533411837,"dist-tags":{"latest":"3.0.15"}}