@mnrendra/types-package
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@mnrendra/types-package

package.json interface extended from the official and unofficial fields.

Install

npm i -D @mnrendra/types-package

Usage

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

import type {
  Package // `package.json` interface extended from the official and unofficial fields.
} from '@mnrendra/types-package'

License

MIT

Author

@mnrendra

Package Sidebar

Install

npm i @mnrendra/types-package

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

72.7 kB

Total Files

5

Last publish

Collaborators

  • mnrendra