From 694b1d528f0b8d7a9bcb355d106107859332e009 Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Wed, 19 Jun 2013 18:08:15 +1000 Subject: [PATCH 1/2] Fixed for TS0.9 : angular-resource: declare required chai-assert: 'declare' modifier not allowed for code already in an ambient context. chai: Trailing comma not allowed --- angularjs/angular-resource.d.ts | 2 +- chai/chai-assert.d.ts | 2 +- chai/chai.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 953ce7ef4..21731a36d 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////////// // ngResource module (angular-resource.js) /////////////////////////////////////////////////////////////////////////////// -module ng.resource { +declare module ng.resource { /////////////////////////////////////////////////////////////////////////// // ResourceService diff --git a/chai/chai-assert.d.ts b/chai/chai-assert.d.ts index b31b7bde5..ab1a23d14 100644 --- a/chai/chai-assert.d.ts +++ b/chai/chai-assert.d.ts @@ -107,7 +107,7 @@ declare module chai ifError(val:any, msg?:string); } //node module - declare var assert:Assert; + var assert:Assert; } //browser global declare var assert:chai.Assert; \ No newline at end of file diff --git a/chai/chai.d.ts b/chai/chai.d.ts index df9e12382..5034b8153 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -35,7 +35,7 @@ declare module chai { interface TypeComparison { (type: string, message?: string): bool; - instanceof(type: Object, ): bool; + instanceof(type: Object): bool; } interface NumericComparison { From af07ce5360c529c0bdd86a1ec40c92eb36140af7 Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Thu, 20 Jun 2013 09:31:14 +1000 Subject: [PATCH 2/2] fixing tests to work with TS0.9 --- angularjs/angular-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index 6354e188c..3ea1371f4 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -142,7 +142,7 @@ module HttpAndRegularPromiseTests { // Test for AngularJS Syntac module My.Namespace { - + export var x; // need to export something for module to kick in } // IModule Registering Test @@ -150,7 +150,7 @@ var mod = angular.module('tests',[]); mod.controller('name', function($scope : ng.IScope) {}) mod.controller('name', ['$scope', function($scope : ng.IScope) {}]) mod.controller(My.Namespace); -mod.directive('name', function($scope : ng.IScope) {}) +mod.directive('name', function ($scope: ng.IScope) {}) mod.directive('name', ['$scope', function($scope : ng.IScope) {}]) mod.directive(My.Namespace); mod.factory('name', function($scope : ng.IScope) {})