https://github.com/mnrendra/types-package
package.json interface extended from the official and unofficial fields.
https://github.com/mnrendra/types-package
package-json typescript typescript-definitions
Last synced: 6 months ago
JSON representation
package.json interface extended from the official and unofficial fields.
- Host: GitHub
- URL: https://github.com/mnrendra/types-package
- Owner: mnrendra
- License: mit
- Created: 2023-07-13T12:47:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T17:43:06.000Z (over 1 year ago)
- Last Synced: 2025-10-05T20:30:05.200Z (9 months ago)
- Topics: package-json, typescript, typescript-definitions
- Language: TypeScript
- Homepage: https://npmjs.com/package/@mnrendra/types-package
- Size: 381 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @mnrendra/types-package
`package.json` interface extended from the official and unofficial fields.
## Install
```bash
npm i -D @mnrendra/types-package
```
## Usage
```typescript
import type { Package } from '@mnrendra/types-package'
import { readFileSync } from 'fs'
import { resolve } from 'path'
import { cwd } from 'process'
const { name, version }: Package = JSON.parse(readFileSync(resolve(cwd(), 'package.json'), 'utf-8'))
console.log(name, version)
```
## Types
```typescript
import type {
Package // `package.json` interface extended from the official and unofficial fields.
} from '@mnrendra/types-package'
```
## License
[MIT](https://github.com/mnrendra/types-package/blob/HEAD/LICENSE)
## Author
[@mnrendra](https://github.com/mnrendra)