diff --git a/examples/typescript/index.ts b/examples/typescript/index.ts index c36b60fa6..a55c95212 100644 --- a/examples/typescript/index.ts +++ b/examples/typescript/index.ts @@ -1,4 +1,5 @@ -import axios from "axios"; +import axios, { AxiosPromise } from "axios"; + export class DogService { private url: string; @@ -9,7 +10,7 @@ export class DogService { this.port = endpoint.port; } - public getMeDogs = (): Promise => { + public getMeDogs = (): AxiosPromise => { return axios.request({ baseURL: `${this.url}:${this.port}`, headers: { Accept: "application/json" }, diff --git a/examples/typescript/package.json b/examples/typescript/package.json index c4eb73fc0..a3920e687 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -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" } }