diff --git a/Gruntfile.js b/Gruntfile.js index 05b45cc96639ccb67ff8cc9f0445d45603db60c7..c4a92c3d8fbef8dd5a43b5ff7dff986df3a68bfe 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,12 +11,15 @@ module.exports = function(grunt) { dist: 'dist/**' }, - typings: { - install: {} - }, - ts: { test: { + options: { + lib: [ + 'es5', + 'es2015.promise', + 'dom' + ] + }, src: ['typings/index.d.ts', 'test/typescript/*.ts'] } }, @@ -93,7 +96,7 @@ module.exports = function(grunt) { grunt.file.write('bower.json', JSON.stringify(bower, null, 2)); }); - grunt.registerTask('test', 'Run the jasmine and nodeunit tests', ['eslint', 'nodeunit', 'karma:single', 'typings', 'ts']); + grunt.registerTask('test', 'Run the jasmine and nodeunit tests', ['eslint', 'nodeunit', 'karma:single', 'ts']); grunt.registerTask('build', 'Run webpack and bundle the source', ['clean', 'webpack']); grunt.registerTask('version', 'Sync version info for a release', ['usebanner', 'package2bower']); }; diff --git a/index.d.ts b/index.d.ts index 03c7f1bfe27ac1afb0ef48297a0569871d1044e1..04b85d68686cb771cc8ad45da2878a6a4c1127bf 100644 --- a/index.d.ts +++ b/index.d.ts @@ -58,12 +58,6 @@ export interface AxiosError extends Error { response?: AxiosResponse; } -export interface Promise { - then(onFulfilled: (value: V) => R1 | Promise, onRejected: (error: any) => R2 | Promise): Promise; - then(onFulfilled: (value: V) => R | Promise): Promise; - catch(onRejected: (error: any) => R | Promise): Promise; -} - export interface AxiosPromise extends Promise { } diff --git a/package.json b/package.json index 029c2ef4d999a23be8fdc24a6eb6ccd2c14b2bad..320c5cd2bf96353c28481e1d8218768541b6c411 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "grunt-eslint": "^19.0.0", "grunt-karma": "^2.0.0", "grunt-ts": "^6.0.0-beta.3", - "grunt-typings": "^0.1.5", "grunt-webpack": "^1.0.18", "istanbul-instrumenter-loader": "^1.0.0", "jasmine-core": "^2.4.1", diff --git a/test/typescript/axios.ts b/test/typescript/axios.ts index d3d319843f075f74ba6de39c3db89312c6ee6389..c5492d8470622d5599b5d47ec8459e69f6172471 100644 --- a/test/typescript/axios.ts +++ b/test/typescript/axios.ts @@ -10,8 +10,6 @@ import axios, { Canceler } from '../../'; -import { Promise } from 'es6-promise'; - const config: AxiosRequestConfig = { url: '/user', method: 'get', diff --git a/typings.json b/typings.json deleted file mode 100644 index e1680431ef53eb35dca5f49ec64cb768939663e5..0000000000000000000000000000000000000000 --- a/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "es6-promise": "registry:npm/es6-promise#3.0.0+20160723033700" - } -}