diff --git a/apps/package.json b/apps/package.json index 2cff88fe6..f5cf7c4f8 100644 --- a/apps/package.json +++ b/apps/package.json @@ -22,6 +22,6 @@ "lazy": "1.0.11", "nativescript-dev-typescript": "^0.5.0", "tns-platform-declarations": "*", - "typescript": "~2.5.1" + "typescript": "^2.6.1" } } diff --git a/package.json b/package.json index 391a43358..f6ff1aa26 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "tslint": "^5.4.3", "typedoc": "^0.5.10", "typedoc-plugin-external-module-name": "git://github.com/PanayotCankov/typedoc-plugin-external-module-name.git#with-js", - "typescript": "^2.5.2" + "typescript": "^2.6.1" }, "scripts": { "setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps", diff --git a/tests/app/fetch/fetch-tests.ts b/tests/app/fetch/fetch-tests.ts index 9b9e6edc1..b6df4a99e 100644 --- a/tests/app/fetch/fetch-tests.ts +++ b/tests/app/fetch/fetch-tests.ts @@ -102,7 +102,7 @@ export var test_fetch_response_headers = function (done) { export var test_fetch_headers_sent = function (done) { fetch("https://httpbin.org/get", { method: "GET", - headers: { "Content-Type": "application/json" } + headers: new Headers({ "Content-Type": "application/json" }), }).then(function (response) { var result = response.headers; TKUnit.assert(result.get("Content-Type") === "application/json", "Headers not sent/received properly! Actual result is: " + result); @@ -117,7 +117,7 @@ export var test_fetch_post_form_data = function (done) { fetch("https://httpbin.org/post", { method: "POST", - headers: { "Content-Type": "application/x-www-form-urlencoded" }, + headers: new Headers({ "Content-Type": "application/x-www-form-urlencoded" }), body: data }).then(r => { return r.formData(); @@ -131,7 +131,7 @@ export var test_fetch_post_json = function (done) { // >> fetch-post-json fetch("https://httpbin.org/post", { method: "POST", - headers: { "Content-Type": "application/json" }, + headers: new Headers({ "Content-Type": "application/json" }), body: JSON.stringify({ MyVariableOne: "ValueOne", MyVariableTwo: "ValueTwo" }) }).then(r => { return r.json(); }).then(function (r) { // >> (hide) diff --git a/tests/package.json b/tests/package.json index a8c3e9da1..075dfe468 100644 --- a/tests/package.json +++ b/tests/package.json @@ -22,6 +22,6 @@ "filewalker": "0.1.2", "lazy": "1.0.11", "tns-platform-declarations": "*", - "typescript": "~2.2.1" + "typescript": "^2.6.1" } } diff --git a/tns-platform-declarations/package.json b/tns-platform-declarations/package.json index c029827e8..63c3911c3 100644 --- a/tns-platform-declarations/package.json +++ b/tns-platform-declarations/package.json @@ -32,6 +32,6 @@ }, "homepage": "https://github.com/NativeScript/NativeScript#readme", "devDependencies": { - "typescript": "~2.2.1" + "typescript": "^2.6.1" } }