Skip to content

Commit

Permalink
fix(examples/typescript): fix example failing to run
Browse files Browse the repository at this point in the history
fix(examples/typescript): fix example failing to run
  • Loading branch information
TimothyJones authored Sep 27, 2018
2 parents 2ba8dbe + 42bbb9a commit f2ed7d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions examples/typescript/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";
import axios, { AxiosPromise } from "axios";


export class DogService {
private url: string;
Expand All @@ -9,7 +10,7 @@ export class DogService {
this.port = endpoint.port;
}

public getMeDogs = (): Promise<any> => {
public getMeDogs = (): AxiosPromise => {
return axios.request({
baseURL: `${this.url}:${this.port}`,
headers: { Accept: "application/json" },
Expand Down
7 changes: 4 additions & 3 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"license": "MIT",
"devDependencies": {
"@types/mocha": "^2.2.41",
"mocha": "3.x",
"nyc": "^11.2.0"
"mocha": "^3.5.3",
"nyc": "^11.9.0"
},
"dependencies": {
"axios": "^0.17.1"
"axios": "^0.17.1",
"typescript": "^3.0.3"
}
}

0 comments on commit f2ed7d7

Please sign in to comment.