Skip to content

Generate Typescript from JSDOCs #1390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"es6": true
},
"parser": "babel-eslint",
"globals": {
"wx": true
"globals": {
"wx": true
},
"plugins": [
"flowtype",
Expand Down Expand Up @@ -50,7 +50,8 @@
{
"definedTags": [
"flow",
"flow-weak"
"flow-weak",
"template"
]
}
],
Expand All @@ -61,7 +62,14 @@
"AuthProvider",
"AsyncStorage",
"LocalDatastoreController",
"Parse"
"Parse",
"ReturnType",
"Params",
"this",
"Attributes",
"R",
"T",
"K"
]
}
]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build:
runs-on: ubuntu-18.04
timeout-minutes: 30
env:
env:
MONGODB_VERSION: 3.6.9
steps:
- uses: actions/checkout@v2
Expand All @@ -38,6 +38,8 @@ jobs:
- run: npm install -g mongodb-runner
- run: mongodb-runner start
- run: npm run lint
- run: npm run types
- run: npm run test:types
- run: npm test -- --maxWorkers=4
- run: npm run integration
env:
Expand Down
2 changes: 1 addition & 1 deletion integration/test/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Parse = require('../../node');
* Calls /clear route in integration/test/server.js
*
* @param {boolean} fast set to true if it's ok to just drop objects and not indexes.
* @returns {Promise} A promise that is resolved when database is deleted.
* @returns {Promise<any>} A promise that is resolved when database is deleted.
*/
module.exports = function (fast = true) {
return Parse._ajax('GET', `http://localhost:1337/clear/${fast}`, '');
Expand Down
2 changes: 1 addition & 1 deletion jsdoc-conf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["node_modules/jsdoc-babel", "plugins/markdown"],
"plugins": ["node_modules/jsdoc-babel", "plugins/markdown", "jsdoc-plugin-intersection"],
"babel": {
"plugins": ["@babel/plugin-transform-flow-comments"]
},
Expand Down
24 changes: 24 additions & 0 deletions jsdoc-ts-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"plugins": ["node_modules/jsdoc-babel", "plugins/markdown", "./node_modules/tsd-jsdoc/dist/plugin", "./types/plugin.js"],
"babel": {
"plugins": ["@babel/plugin-transform-flow-strip-types"]
},
"source": {
"include": ["./README.md"],
"excludePattern": "(^|\\/|\\\\)_"
},
"templates": {
"default": {
"outputSourceFiles": false,
"showInheritedInNav": false,
"useLongnameInNav": true
},
"cleverLinks": true,
"monospaceLinks": false
},
"opts": {
"template": "./node_modules/tsd-jsdoc/dist",
"recurse": true,
"destination": "types"
}
}
Loading