Skip to content

Commit

Permalink
chore: v1.0.0 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Aug 24, 2022
1 parent dc64cb1 commit 739e624
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI
on:
pull_request:
push:
branches:
- master

jobs:
Tests:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jsdoc2flow

Convert JSDoc comments into Flow annotations
Convert JSDoc comments into Flow/Typescript annotations

![CI](https://github.com/dannysu/jsdoc2flow/workflows/CI/badge.svg)

Expand Down Expand Up @@ -98,9 +98,11 @@ Options:
-h, --help display help for command
```

After conversion to Flow, you can convert your code to TypeScript using [`@khanacademy/flow-to-ts`](https://www.npmjs.com/package/@khanacademy/flow-to-ts)

## API

```javascript
```js
const Converter = require("jsdoc2flow")
const converter = new Converter(opts)

Expand Down Expand Up @@ -130,15 +132,13 @@ You can document using `@typedef` to define custom types:

- Alias

```
/**
* @typedef {number} MyNumber
*/
```js
/** @typedef {number} MyNumber */
```

- Custom Object

```
```js
/**
* @typedef {object} MyObject
* @property {string} str
Expand All @@ -148,7 +148,7 @@ You can document using `@typedef` to define custom types:

For callback and functions, you can use `@callback`:

```
```js
/**
* @callback MyCallback
* @param {number} arg1
Expand All @@ -158,7 +158,7 @@ For callback and functions, you can use `@callback`:

## @type Annotation

```
```js
/** @type {number} */
const count = 1;
/** @type {MyObject} */
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jsdoc2flow",
"version": "0.13.2",
"description": "Convert JSDoc comments into Flow annotations",
"version": "1.0.0",
"description": "Convert JSDoc comments into Flow/Typescript annotations",
"main": "src/index.js",
"scripts": {
"format": "prettier --write .",
Expand Down Expand Up @@ -48,7 +48,11 @@
"jsdoc",
"flow",
"js2typescript",
"js2ts"
"js2ts",
"typescript",
"ts",
"dts",
"dts-gen"
],
"author": "Amin Yahyaabadi <aminyahyaabadi74@gmail.com>, Danny Su <contact@dannysu.com>",
"license": "MIT",
Expand Down

0 comments on commit 739e624

Please sign in to comment.