Commit Graph
567 Commits
Author SHA1 Message Date
Adam SzmydandMasahiro Wakame 7f1ea1f53f Add AngularJS linky filter definition (#11507) 2016-09-30 21:57:20 +09:00
AndyandGitHub 3c3bb42035 Merge pull request #11389 from thorn0/refine-ddo
angularjs: Refine typings for directive and component definitions
2016-09-22 12:53:58 -07:00
Boris Cherny 5f3a129fd8 parameterize angular/IChangesObject 2016-09-22 10:57:30 -07:00
Georgii Dolzhykov 624de0de10 angularjs: Refine typings for directive and component definitions 2016-09-22 03:21:07 +03:00
Christopher CortesandGitHub f4f57de0b5 Replace tabs by whitespaces
Fix issues with tabs in IComponentBindings and IDirectiveScope
2016-09-21 16:38:30 +02:00
Christopher CortesandGitHub f63a1b638f Fix wrong whitespacing in IComponentBindings
Removed wrong whitespaces.
2016-09-21 16:18:46 +02:00
Christopher CortesandGitHub a0cda86791 Add interfaces for Directive scope and Component bindings
Interfaces for scope property in Directive and bindings property in Component to avoid using simple Object (not descriptive enough) and the explicit type {[binding: string]: string} which is too verbose.
2016-09-21 16:08:45 +02:00
AndyandGitHub c151763c60 Merge pull request #10668 from smfeest/multi_slot_transclude
Add additional $transclude function parameters
2016-09-20 07:42:39 -07:00
Nick GraefandMasahiro Wakame ff71c3d812 enforce action hash type in $resource() (#11212) 2016-09-14 22:20:03 +09:00
ersimontandMasahiro Wakame c393c1f1f7 support $injector.get('$resource') (#11161) 2016-09-14 20:41:24 +09:00
Juras NorkusandMasahiro Wakame 17f7f965f5 angular.d.ts: add isObject<T> (#11144)
This allows user-defined type guards for specific objects.
2016-09-09 22:38:06 +09:00
Jose Chiarino 9af1c6884a Add eventHandlers/uploadEventHandlers properties to angular $http configuration object https://docs.angularjs.org/api/ng/service/$http#usage 2016-09-07 21:49:52 -07:00
Georgii DolzhykovandMasahiro Wakame 4c530f28d1 I'd like to become a reviewer for the core Angular 1.x definitions (#11083)
To prevent situations like #11039
2016-09-07 21:16:23 +09:00
Georgii DolzhykovandMasahiro Wakame a5608d64a3 Revert "Add missing definition" (#11039) 2016-09-07 20:04:49 +09:00
DanielMandMasahiro Wakame dc77ccd8e1 Add interface to refer to the $onChanges parameter (#10803)
The $onChanges method of the IComponentController interface has the type in-lined, making it impossible to refer to it. A new interface was added to encapsulate this type, so that it can be easily used and extended.
2016-08-30 00:25:10 +09:00
Daniel NiederbergerandGitHub 5863f2493e Add missing definition
In angular you can either write `directive('myDirective', ['$http', function($http) {...}])`, which is minification safe, but it's also possible to write `directive('myDirective', function($http) {...})` which might not be minification safe, but valid angular nonetheless.
2016-08-19 17:50:10 +02:00
Stephen Feest ed50b4775d Add $transclude function tests
These tests try to exercise the different ways that the $transclude can be
called including:

+ With and without specifying the scope explicitly
+ With and without a clone attach function
+ With and without specifying the future parent
+ Using the default and named transclude slots
2016-08-17 21:35:36 +01:00
Stephen Feest 6d9768b337 Add additional $transclude function parameters
A couple of additional optional parameters were added to the `$transclude`
function when support for multi-slot transclusion was added in Angular 1.5 [1].
This commit updates the `ITranscludeFunction` type definition to reflect those
changes.

[1] https://docs.angularjs.org/api/ng/service/$compile#-controller-
2016-08-17 10:03:38 +01:00
Paul van BrenkandGitHub 3a056e3864 Merge pull request #10527 from snebjorn/patch-1
Rename name property from ng.IDirective
2016-08-15 16:23:00 -07:00
Alexander Ryabtsev d2394f5008 Fix type defenition for canActivate function 2016-08-15 16:21:22 +03:00
snebjornandGitHub 60e569b7a2 Rename name property from ng.IDirective
Rename name property from ng.IDirective as there is no mention of this property in the official API documentation (https://docs.angularjs.org/api/ng/service/$compile) and it was causing issues with directives made as classes like so:

class MyDirective implements ng.IDirective {
    public template = "<div>{{ test }}</div>";
    public scope = {
        test: "="
    };

    public static name = "myDirective";
    public static $inject: string[] = ["$http"];

    constructor(private $http: ng.IHttpService) {
    }

    public link(scope: IDirectiveScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) {
    }
}

angular.module("app")
    .directive(MyDirective.name, DirectiveFactory.getFactoryFor(UserProjectRoles));

See http://stackoverflow.com/questions/38853868/typeerror-when-class-has-static-member-name for more details.

Changing it to another non-reserved name fixes the issue.
2016-08-09 17:19:18 +02:00
jamescowardandMasahiro Wakame 12ede35d5b Added simple User-Defined type guards (#10419)
Added type guards to:

angular.isArray()
angular.isDate()
angular.isFunction()
angular.isNumber()
angular.isObject()
angular.isString()  

See: https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards
2016-08-03 00:51:23 +09:00
brettandMasahiro Wakame 7924aabc0d added missing property to angularjs IFormController $name (#10352) 2016-08-02 22:37:50 +09:00
Volker BraunandMasahiro Wakame 060060dc34 Return intersection type when indexing IDocumentService (#10267)
Typescript 2.0 starts checking the compatibility of the index
signature with the base JQuery interface; Hence we are forced to
return Document & HTMLElement to be compatible with the base.
2016-07-25 16:33:51 +09:00
Tim SchubertandMohamed Hegazy d55ed5d0f1 angularjs - Added optional interceptorFn and expensiveChecks parameters to IParseService (#10213) 2016-07-23 23:34:39 -07:00
Volker BraunandMohamed Hegazy 66876a46ec Indexing the IDocumentService should return Document (#10237)
JQ(lite)-unwrapping $document[0] should be of type Document instead of
the default HTMLElement. Otherwise important methods like
getElementById are missing.
2016-07-23 23:01:27 -07:00
Boris AranovichandGitHub b4a7ad8945 Comment from official docs about angular.IComponentOptions.require 2016-07-20 10:18:06 +03:00
Andrew MayorovandMasahiro Wakame d9e7db3b10 $animate.enabled() is also callable w/o params (#9961)
* $animate.enabled() is also callable w/o params

* Removed one overload in favour for optional parameter.
2016-07-09 15:15:15 +09:00
BjørnandMasahiro Wakame 5f91dac715 Update IAngularBootstrapConfig in angularjs (#9935) 2016-07-09 14:51:39 +09:00
noXi89andGitHub d1c9da6205 removed duplicate element "require" 2016-06-27 12:52:03 +02:00
Mohamed HegazyandGitHub 7de84f761e Merge pull request #7151 from darktutu/master
directive compile can returns no value
2016-06-26 18:41:39 -07:00
Mohamed HegazyandGitHub 1a10e34082 Merge pull request #8071 from damianog/patch-1
Missing "require" property on IComponentOptions
2016-06-26 16:53:04 -07:00
Mohamed HegazyandGitHub e0d034435a Merge pull request #9816 from mickeyvip/master
Correct method name ($postLink)
2016-06-26 00:36:51 -07:00
MickeyandGitHub de6643ff66 Correct method name ($postLink)
`$postInit` should be `$postLink`
2016-06-25 02:26:37 +03:00
Stijn Van Nieuwenhuyse 16a685f88b Fix angular-animate definitions
- Rename transition to transitionStyle and keyframe to keyFrameStyle
- Add missing structural and cleanupStyles properties
2016-06-24 10:55:06 +02:00
Mohamed HegazyandGitHub bac71b9a6e Merge pull request #8354 from rgvassar/animateService
angular-animate
2016-06-22 16:44:02 -07:00
Ryan GomotoandMasahiro Wakame 1bb5729fd4 Update angular.d.ts (#9678) 2016-06-19 11:58:52 +09:00
dutchmegaandMasahiro Wakame fe8dc9ea05 Fix AngularJS IComponentOptions.require signature (#9605)
* Fix AngularJS IComponentOptions.require signature.

* Fix AngularJS test.
2016-06-19 02:56:09 +09:00
Georgii DolzhykovandHoriuchi_H 592a11f956 Deprecate IAugmentedJQuery and IAugmentedJQueryStatic because Angular doesn't create separate derived types. It directly extends jQuery.prototype. (#9632) 2016-06-14 18:12:01 +09:00
Boris AranovichandMasahiro Wakame 07c949931f Angular 1.5+ component Controllers lifecycle hooks (#9606)
Angular 1.5+ component Controllers have four new lifecycle hooks:
$onInit()
$onDestroy()
$onChanges(...)
$postInit()

There is currently no reference to any of then in the definitions files.

I added an additional interface to the component's controller type that defines the new hooks with the official documentation from docs.angularjs.org
2016-06-14 00:10:08 +09:00
venandMasahiro Wakame 00c03deedd new on a IResourceClass will return a IResource (#9593) 2016-06-13 23:22:17 +09:00
homesarandMasahiro Wakame 0a23a2055d Updating angular-mocks to 1.5 (#8579)
* Updating angular-mocks to 1.5

* Fixing test

* cleanup
2016-06-08 19:47:21 +09:00
Georgii DolzhykovandMasahiro Wakame cec53b2710 angularjs: $parseProvider.addLiteral & setIdentifierFns (#9472)
docs: https://docs.angularjs.org/api/ng/provider/$parseProvider
2016-06-03 01:01:39 +09:00
venandMasahiro Wakame 32e93d9fa7 fix typo (#9450) 2016-06-02 21:55:22 +09:00
Caleb EggenspergerandMasahiro Wakame 191daf6112 Fix component router breakage (#9442) 2016-06-02 21:49:24 +09:00
Boris ChernyandMasahiro Wakame b76dd8a7f9 angularjs: overload .get with typings for builtin servies (#9345) 2016-05-16 23:48:39 -07:00
Luka JeranandMasahiro Wakame d907a0156a Fix IFormController methods in angular.d.ts (#9234) 2016-05-10 00:04:41 +09:00
Alex StaroselskyandMasahiro Wakame 5b7257019a Exposed angular.mock.module.sharedInjector method for jasmine and mocha testing to take advantage of jasmine's beforeAll() and mocha's before() methods. (#9106) 2016-04-26 00:50:16 +09:00
Ken HowardandMasahiro Wakame e684481e0c Return typed definition from toJSON method (#8859)
* Return typed definition from toJSON method

* Test toJSON returns IMyResource
2016-04-12 23:22:09 +09:00
Anthony CiccarelloandMasahiro Wakame 0ea6c46516 Add ControllerService to angular-mocks (#8889)
* Add ControllerService to angular-mocks

The definition in angular.d.ts changed that used to included this definition.
Needed because of 69d2fb9

* Added unit tests for controller service mock
2016-04-12 22:42:42 +09:00