bio-dts 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/lib/post-transform.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,17 @@ This module provides `pre` and `post` processing helpers to a type definition pi
|
|
|
15
15
|
npx bio-dts --outDir dist/types -r lib
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
* Generates clean type definitions from ES5 code bases
|
|
22
|
+
* Supports ES5 prototypical classes + inheritance
|
|
23
|
+
* Supports optional parameters before required ones
|
|
24
|
+
* Converts JSDoc to [TSDoc](https://github.com/microsoft/tsdoc)
|
|
25
|
+
|
|
26
|
+
Checkout the [test fixtures](./test/fixtures) for full coverage.
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
## API
|
|
19
30
|
|
|
20
31
|
```javascript
|
|
@@ -38,4 +49,4 @@ const transformedCode = postTransform(tsCode);
|
|
|
38
49
|
generateTypes(files, {
|
|
39
50
|
outDir: 'dist'
|
|
40
51
|
});
|
|
41
|
-
```
|
|
52
|
+
```
|
package/lib/post-transform.js
CHANGED
|
@@ -199,7 +199,7 @@ export default function transform(src) {
|
|
|
199
199
|
for (const tag of tags) {
|
|
200
200
|
|
|
201
201
|
// remove full line including the non-TS tag
|
|
202
|
-
if (/class|constructor|template|method|typedef/.test(tag.name)) {
|
|
202
|
+
if (/class|constructor|template|method|typedef|property/.test(tag.name)) {
|
|
203
203
|
replacements.push([ { start: tag.start - 4, end: tag.end } ]);
|
|
204
204
|
|
|
205
205
|
continue;
|