https://github.com/zhangyu1818/generate-d-ts
generate d.ts by typescript api.
https://github.com/zhangyu1818/generate-d-ts
Last synced: 3 months ago
JSON representation
generate d.ts by typescript api.
- Host: GitHub
- URL: https://github.com/zhangyu1818/generate-d-ts
- Owner: zhangyu1818
- Created: 2021-07-17T05:52:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-17T06:09:44.000Z (almost 4 years ago)
- Last Synced: 2025-01-29T08:45:03.880Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# generate-d-ts
Generate d.ts by TypeScript api.
## Installation
```sh
npm i generate-d-ts
```## Usage
```js
const { createDeclarations, writeDeclarations } = require('generate-d-ts') // or import/**
* @param filesPath string[]
* @param outDir string
*/
const declarations = createDeclarations(['src/index.ts', 'src/component.ts'], 'lib')// write files
writeDeclarations(declarations)
```