Commit Graph

47 Commits

Author SHA1 Message Date
Ilya Mochalov
7652914a5b angularjs: changed $timeout signature, added tests 2015-08-20 01:40:24 +05:00
Ilya Mochalov
d9b84213f2 angularjs: added $q tests 2015-08-18 19:46:11 +05:00
Ilya Mochalov
18c24780e3 angularjs: added Promise tests 2015-08-13 22:03:20 +05:00
Ilya Mochalov
fcc892bba5 angularjs: changed $q.all() (added a type variable and tests) 2015-08-07 23:36:27 +05:00
Ciuca, Alexandru
3e2a590f8f angularjs - Switched any to generics for type safety.
See https://github.com/Microsoft/TypeScript/issues/4126
2015-08-04 10:57:41 +03:00
unknown
146e3fbff1 angularjs - Added $normalize to IAttributes 2015-07-09 12:01:43 +02:00
Bill Chen
8c64199797 Made the signature of INgModelController.$validators more precise and
corrected the return type of $asyncValidators

Tests included.
2015-06-09 17:21:58 +01:00
Dmitry V. Abuzyarov
3e6f6339a5 Add Decorator definition to IModule 2015-05-31 15:02:01 +03:00
Paulo Cesar
eb3420c93c update angular to released version 1.3+ 2014-11-12 01:57:38 -02:00
vvakame
7252edb0ec fix broken test 2014-10-27 11:26:08 +09:00
vvakame
0efa290ca6 update angular.d.ts 2014-10-27 11:22:46 +09:00
johnnyreilly
4553fe17eb .search now allows number for paramValue 2014-09-05 14:03:19 +01:00
John Reilly
17b7b270f5 Tightened up the ILocationService typings a little 2014-08-22 17:07:11 +01:00
John Reilly
639aa3c14d Made tests noImplicitAny compliant 2014-08-22 12:14:55 +01:00
John Reilly
1b247dd0c7 AngularJS: Genericised angular.copy and added JSDoc 2014-08-22 12:09:25 +01:00
Paulo Cesar
82447ac010 squash! fix tabs
directive interface definition and tests
2014-08-08 12:24:43 -03:00
Paulo Cesar
f1a45e0d4e directive accept classes 2014-08-05 21:44:37 -03:00
John Reilly
86d681f289 Fix test 2014-07-29 11:26:06 +01:00
John Reilly
68a3cb2875 Fix test 2014-07-29 11:21:28 +01:00
John Reilly
22894235a2 Add genericised forEach and indexer for FormController 2014-07-29 11:08:28 +01:00
vvakame
c322a99ff4 add test for angular.d.ts 2014-07-24 23:07:06 +09:00
vvakame
1ef19827ea Merge branch 'patch-2' of github.com:ngbrown/DefinitelyTyped into ngbrown-patch-2 2014-07-24 22:52:43 +09:00
Tobias Bengfort
ba1b3d7d60 Fixup 2014-07-23 14:08:31 +02:00
Tobias Bengfort
625b9f2523 Fixup 2014-07-21 15:33:31 +02:00
Tobias Bengfort
fe47b495c8 angularjs: allow $q.when to be called w/o args
The current definition does not cover the case that the input type is
void.
2014-07-21 11:16:24 +02:00
Herbert Poul
e839251ce9 Changed order of IHttpPromise.then for promise chaining
previously the following code resulted in tmp beeing of type:
ng.IPromise<ng.IPromise<{}>> but it should be just ng.IPromise<{}>:

var tmp = this.$http.get('').then((result) => this.$q.defer().promise);
2014-07-02 18:17:13 +02:00
Greg Smith
666233c5a0 angular: Add isolateScope() to jqLite 2014-06-20 10:56:38 -05:00
Nathan Brown
72b9fbed7f angular.d.ts: update test to use class for module
Converted the test module, 'http-auth-interceptor', to a class to
eliminate error on using anonymous type constructor.
2014-06-18 19:55:32 -07:00
John Reilly
2e030fa8c4 Added typing to IHttpService 2014-06-02 14:13:54 +01:00
Ryan Cavanaugh
8959bcdc71 Manually specify generic type parameter so return expression types match 2014-05-21 14:25:49 -07:00
unknown
e7396efb0c Change my tabs to spaces 2014-03-14 11:19:32 -04:00
unknown
bd9d835aa7 Fix $q.when definition 2014-03-14 11:13:07 -04:00
Michel Salib
62f9fa8fda Adding angular $animate definition 2014-02-12 14:50:21 +01:00
vvakame
be2633af53 Remove angularjs/angular-tests.ts.tscparams 2014-01-11 23:09:19 +09:00
Igor Oleinikov
b3e31cb848 angularjs: fixed errors in angular-tests.ts related to switch on TS 0.9.5 2013-12-06 15:15:53 +04:00
Jacob Boland
c8881ff07b Add IAttributes tests 2013-10-23 14:55:46 -07:00
Elmar Athmer
01912ae5e7 add support for angular.element
angular.element augments the JQuery object for the given element with
angular specific methods like e.g. access for the scope.
2013-08-30 18:11:40 +02:00
Elmar Athmer
bd8293d2a5 fix typo 2013-08-30 17:57:59 +02:00
basarat
402fd36440 angularjs: Reverting to using stronger signatures for IPromise. With tests for that. 2013-08-27 22:13:20 +10:00
basarat
f1bdd8b3df added tests for angular promise chain 2013-08-26 22:12:06 +10:00
anchann
135a8579ee Angular: typing promises, deferreds 2013-08-09 16:28:13 +09:00
Georgios Diamantopoulos
25c88427fb Added generics to IHttpPromise and some missing properties/overloads
I know you haven't used generics so far so I hope this is a welcome
change - the only nuisance is that it will "break" current compilation
but will increase type safety by far.

Also added params to ICurrentRoute and inline injection notation to
$provide.decorator as per
https://github.com/borisyankov/DefinitelyTyped/issues/799
2013-08-05 12:06:53 +03:00
James Hudon
1a32cce3e0 AngularJS: give an interface to $http callback functions
- add IHttpPromiseCallback for both `error` and `success` promise calls

use case is if we're passing around the callback, we don't want to be
repeating that entire function declaration every time, and we cannot use
`Function` as that doesn't satisfy the compiler. (see test case)
2013-07-23 23:45:49 -04:00
Basarat Syed
af07ce5360 fixing tests to work with TS0.9 2013-06-20 09:31:14 +10:00
Albert Weinert
558d616fd5 angular.d.t.s ng.IModule use of Object instead of {}, added tests 2013-04-03 16:05:10 +02:00
Anton Zolotkov
26d0c8a757 AngularJS: fixed typing of the ng.IPromise.then function
The type definition for ng.IPromise.then was, in my opinion, incorrect
semantically, and breaking on practical examples in my codebase.

An `IPromise`' `then` function takes a callback which is called with the
value of the promise once it's fulfilled. This could be a number, a
string, some object, an array of strings, anything really. Yet the
typing in angular.d.ts specified `then` as taking a `successCallback` of
type `(response: PromiseCallbackArg) => any`.

The definition of `PromiseCallbackArg` seems very permissive at first
glance, as it is defined to be an object with a bunch of fields, all
optional. Any object, a number, and a string all type check correctly
with such a type, but an array of strings, for example, does not
(`cPromise` in the provided list of test).

Furthermore, it seems to me that the `PromiseCallbackArg` definition was
added specifically to support the response type for promises returned by
the Angular `$http` service, the `ng.IHttpPromise`.

So instead of having an incorrect type on the `ng.IPromise.then` function,
I propose we return it to its generic form, and instead override the
type of the inherited `then` function in the `ng.IHttpPromise` interface.
This would also warrant renaming `PromiseCallbackArg` to
`IHttpPromiseCallbackArg`.
2013-03-20 11:48:15 +09:00
Diullei Gomes
aed0b8aecd bug fix #369 - status property on angularjs response object 2013-03-06 22:47:53 -03:00