Skip to content

Commit 4915c16

Browse files
committed
change tsconfig target to es6, upgrade ts-node and typescript
1 parent 6309412 commit 4915c16

File tree

4 files changed

+186
-42
lines changed

4 files changed

+186
-42
lines changed

examples/basic.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ import { client } from '../src';
33
async function run() {
44
await client.authenticate();
55
const is_authenticated = await client.isAuthenticated();
6-
console.log(is_authenticated);
6+
console.log('is_authenticated', is_authenticated);
77
if (is_authenticated) {
88
console.log(await client.FoldersService.listFolders({}));
99
console.log(await client.TemplatesService.listTemplates({}));
10-
console.log(
11-
await client.FoldersService.createFolder({
12-
requestBody: {
13-
name: 'Docupilot SDK Folder',
14-
},
15-
}),
16-
);
10+
const folder = await client.FoldersService.createFolder({
11+
requestBody: {
12+
name: 'Docupilot SDK Folder',
13+
},
14+
});
15+
console.log('folder', folder);
1716
}
1817
}
1918

package-lock.json

Lines changed: 173 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"main": "src/index.ts",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8+
"example": "ts-node examples/basic.ts",
89
"generate.spec.node": "./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useOptions --useUnionTypes --client node",
10+
"generate.spec.react": "./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useOptions --useUnionTypes --client xhr",
911
"generate.spec.browser": "./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useUnionTypes --client xhr",
1012
"webpack": "npm run generate.spec.browser && npx webpack --mode=development && npx webpack --mode=production && npm run generate.spec.node"
1113
},
@@ -17,13 +19,11 @@
1719
"form-data": "^4.0.0",
1820
"node-fetch": "^2.6.7",
1921
"openapi-typescript-codegen": "file:../opensource/openapi-typescript-codegen",
22+
"prettier": "^2.7.1",
2023
"ts-loader": "^9.3.1",
21-
"ts-node": "^9.1.1",
22-
"typescript": "^4.2.3",
24+
"ts-node": "^10.9.1",
25+
"typescript": "^4.7.4",
2326
"webpack": "^5.73.0",
2427
"webpack-cli": "^4.10.0"
25-
},
26-
"dependencies": {
27-
"prettier": "^2.2.1"
2828
}
2929
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Basic Options */
66
"incremental": true, /* Enable incremental compilation */
7-
"target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
7+
"target": "ES6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
88
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
99
"allowJs": false, /* Allow javascript files to be compiled. */
1010
// "checkJs": true, /* Report errors in .js files. */

0 commit comments

Comments
 (0)