Commit Graph

89 Commits

Author SHA1 Message Date
barrtender
58d87fc9d4 Fixing ICacheObject::get return type (#29001)
get can return undefined if the key isn't in the cache.

See the example:
https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
```
  superCache.remove('another key');
  expect(superCache.get('another key')).toBeUndefined();
```
2018-09-18 15:24:08 -07:00
Geoff Cameron
ddb90ccfe1 Add tests 2018-08-13 14:18:26 -04:00
Geoff Cameron
322c5e6cad Use real promise base class 2018-08-03 19:34:11 -04:00
Geoff Cameron
a8486a33ea Make typings compatible with ES6 promises
Since ES6 promises don't implement finally, trying to $q.when a third
party promises fails typings. This introduces a new type that is
compatible with this, to allow for typings to work when
taking an ES6 promise.

Totally willing to change the name to something more sensible here
2018-08-02 15:40:03 -04:00
Andy
57ed6e767c
angular: Fix test (#27778) 2018-08-02 08:06:17 -07:00
Richie Foreman
1aa8a708ac Add types for $injector.{loadNewModules, modules} to types/angular (#27240)
* Add {loadNewModules, modules} to angular.auto.IInjectorService

* Add {loadNewModules, modules} to angular.auto.IInjectorService

* Allow for annotated functions in .loadNewModules()

* Fix Injectable Type

* Add useful docstrings (which are pretty much carbon copied from the Angular docs)

* I dont see any whitespace, but travis does.. remove junk

* more

* Add {loadNewModules, modules} to angular.auto.IInjectorService
2018-07-20 17:34:05 -07:00
Oscar Busk
4ef49ba480 Simplify filterfunction using interface instead of silly type 2018-06-28 22:21:06 +02:00
Oscar Busk
f6a902f8ce Improve module.filter() by allowing $stateful to be defined. 2018-06-28 12:27:49 +02:00
Mine Starks
c01777fef8
Merge pull request #26321 from scipper/master
Added new featured to $rootScope from 1.6.10
2018-06-13 08:36:15 -07:00
Lucas Sloan
8dfa12287e Make the IControllerService typings more specific.
Tighten the IControllerService typings by replacing the generic Function type with the more specific (...args: any[]) => T, which specifies a function which returns a generic type matching the controller required.
2018-06-07 13:23:10 -07:00
Steffen Kowalski
ce7505a1d1 fixed errors in @types/angular 2018-06-07 09:31:07 +02:00
Steffen Kowalski
ef970e72ad
added docs to $suspend, $isSuspended and $resume 2018-06-06 15:27:16 +02:00
Steffen Kowalski
43448845ed
Added myself to "Definitions by" 2018-06-06 14:14:35 +02:00
Steffen Kowalski
faa9a6b089
Added new featured to $rootScope from 1.6.10
https://github.com/angular/angular.js/blob/master/CHANGELOG.md#1610-crystalline-persuasion-2018-04-17
2018-06-06 14:13:31 +02:00
Lucas Sloan
2689160921 AngularJS: improve types for IQService.all (support for arrays of non-promises). (#25350) 2018-05-03 10:53:09 -07:00
Oscar Busk
f4e0c531ba Add typing for object syntax on component registerer (#25507) 2018-05-03 10:51:31 -07:00
Daniel Rosenwasser
47e802c56c
Merge pull request #23517 from thorn0/angular-foreach-array-likes
AngularJS: improve types for `foreach` (support for array-likes)
2018-02-15 12:50:30 -08:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Georgii Dolzhykov
628cbd69e1 AngularJS: improve types for foreach (support for array-likes) 2018-02-08 20:50:26 +02:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Georgii Dolzhykov
50ae629d0c AngularJS: rename confusing identifiers in tests (#23314) 2018-01-31 14:44:50 -08:00
Georgii Dolzhykov
37c1b1dfea AngularJS: 1) fix for $q.reject in then callbacks, 2) types for $error and $pending (#23115)
* AngularJS: 1) fix an issue with $q.reject in then callbacks, 2) types for $error and $pending

Fixes #21333

* Promise typings from lib.d.ts + IPromise<never> hack
2018-01-29 12:12:25 -08:00
Benjamin Buhler
4c23e96fc7 Added $processModelValue to INgModelController (#23128)
See https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$processModelValue
2018-01-23 15:03:32 -08:00
Andy
219dd6df82
Fix 'prefer-readonly' lint failures (#22819) 2018-01-10 14:59:37 -08:00
Robin Keller
25bf971c33 Update angular.module to accept an Injectable as the configFn.
This is undocumented behavior in Angular, but works because this argument is passed to $injector.invoke.
See 49aba51e6b/src/loader.js lines 81, 370, and 111
2017-12-21 13:03:39 -08:00
Andy
30957ad3d8
Remove // tslint:disable comments (#22198) 2017-12-14 13:24:24 -08:00
mtraynham
7f84ba072d Add optional generic typing test for Angular IDirectiveCompileFn 2017-11-06 11:55:05 -05:00
mtraynham
bcf7644868 Angular - Default IScope generic typings for backwards compatibility 2017-11-06 11:34:28 -05:00
Daniel Rosenwasser
40d6bf0abd
Merge pull request #21209 from fjmorel/master
angular: Add missing function to ICompileProvider
2017-11-04 01:35:10 -07:00
Fred Morel
20240a4128 Add strictComponentBindingsEnabled to ICompileProvider
Function added in angular 1.6.x
2017-11-02 16:12:59 -04:00
Georgii Dolzhykov
44e215bda7 AngularJS: compatibility with strictFunctionTypes
Fixes #21160
2017-11-01 15:13:22 +03:00
ohze.net
8a6a758e90 add angular.element(callback) (#21011)
see document for `ready()` method at https://docs.angularjs.org/api/ng/function/angular.element#angularjs-s-jqlite
2017-10-26 11:46:09 -07:00
Andy
097d2acf71 Miscellaneous lint fixes (#20849) 2017-10-22 15:22:50 -07:00
aidandownes
0b0c6b20b0 Update type definition for $injector.invoke to be consistent with angular documentation/code. (#19886)
- $inject.invoke also accepts optional context and locals agruments when function is an array annotation format.
- Also added tests.
2017-10-16 09:06:56 -07:00
Elijah Schow
ec2c36e82b Add `$overrideModelOptions' to 'INgModelController' (closes #19136) (#19880)
AngularJS Issue:
https://github.com/angular/angular.js/issues/12884

AngularJS Documentation:
https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$overrideModelOptions

AngularJS Source:
https://github.com/angular/angular.js/blob/master/src/ng/directive/ngModel.js#L863
2017-10-16 09:04:19 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Andy Hanson
56c69546dd angular: Fix tests 2017-10-03 07:28:01 -07:00
oscar_busk
9d409aeadc Angular: add comment about debugInfo on scope()
Add a comment explaining that the scope() and isolatedScope() methods
requires debugInfoEnabled(true) to return the $scope.
2017-08-23 22:10:51 +02:00
Georgii Dolzhykov
69acc07b23 angular: Better types for HTTP interceptors & response objects (#19247)
* Better types for HTTP interceptors & response objects

* Fix failing tests

* Don't use TS 2.3 features, staying compatible with 2.1
2017-08-22 22:22:20 +01:00
Andy
1b54a38a43 Fix remaining lint errors (#19219) 2017-08-21 14:14:31 -07:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
Andy
5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Leonard Thieu
351589d38d [angular] Add index signature to JQLite. (#18767) 2017-08-14 11:28:41 -07:00
Joel Poloney
a7bc5ed2d4 Adding missing race method to angular.IQService (#18476)
* Adding missing race method to angular.IQService

https://docs.angularjs.org/api/ng/service/$q lists race(promises); as a valid method in AngularJS $q. Adding this type so it can be used accordingly.

* Fixing lint errors

* Fixing use of array
2017-07-28 12:47:05 -07:00
Andy
af8b0d1294 FIx new lint errors (#18382) 2017-07-25 10:34:23 -07:00
Angus Jones
2cde2fb1ed Remove [index: string]: any; in IRootScopeService
To bring it into line with both the documentation (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular#a-word-on-scope-and-assigning-new-members) and the general guidelines (https://github.com/Microsoft/TypeScript/issues/12596#issuecomment-299976171).
2017-07-18 10:00:28 +10:00
Ryan Cavanaugh
3f097c6a2c Merge pull request #17554 from andrewiggins/fix-angular-resource
[angular][angular-resource] Cleanup angular readme and angular-resource
2017-07-13 23:28:57 -07:00
Eddie Stanley
cb14ef339d [angular] Added support for specifying the JSON-P callback parameter name to $http service 2017-07-12 19:30:52 +10:00
Leonard Thieu
8850caf6fb [angular] Update @types/jquery v3 merging tests. 2017-07-11 11:59:58 -04:00
Andre Wiggins
d9d3759064 Extend Angular jqLite static interface 2017-06-27 16:01:43 -07:00