Skip to content

Commit 14a5b66

Browse files
doc tweak
1 parent 98cd228 commit 14a5b66

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var collectionUrl = "https://fabrikam.visualstudio.com/defaultcollection";
2222

2323
// ideally from config
2424
let token: string = "cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha";
25-
25+
2626
let authHandler = vm.getPersonalAccessTokenHandler(token);
2727
var connect = new vsts.WebApi(collectionUrl, creds);
2828
```
@@ -52,11 +52,17 @@ let vstsBuild: ba.IBuildApi = connection.getBuildApi();
5252

5353
### Use the client
5454

55+
Coding is easy using linear coding with async/await in typescript
56+
5557
```javascript
5658
import * as bi from 'vso-node-api/interfaces/BuildInterfaces';
5759

58-
let project: string = 'myProject';
59-
let defs: bi.DefinitionReference[] = await vstsBuild.getDefinitions(project);
60+
async function run() {
61+
let project: string = 'myProject';
62+
let defs: bi.DefinitionReference[] = await vstsBuild.getDefinitions(project);
63+
}
64+
65+
run();
6066
```
6167

6268
## APIs
@@ -65,7 +71,8 @@ To see what APIs are available, see the appropriate client interface. For exampl
6571

6672
## Running Samples
6773

68-
Pre-reqs: [Node >= 4.4.7 LTS](https://nodejs.org) and [typescript (tsc) >= 1.8](https://www.npmjs.com/package/typescript)
74+
Pre-reqs: [Node >= 4.4.7 LTS](https://nodejs.org) and [typescript (tsc) >= 1.8](https://www.npmjs.com/package/typescript)
75+
6976
Run `npm install` first
7077

7178
Set environment variables using set or export:

0 commit comments

Comments
 (0)