Commit Graph
329 Commits
Author SHA1 Message Date
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
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
MickeyandGitHub de6643ff66 Correct method name ($postLink)
`$postInit` should be `$postLink`
2016-06-25 02:26:37 +03: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
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
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
Pekka LeppänenandMasahiro Wakame fa3294c560 Enable type checking for constant and value (#8885)
Using a generic type one can type check the `constant` or `value` in angular.module.
2016-04-12 22:32:17 +09:00
Brendon Colburn 0aa772c53f Overload for custom scope interfaces
I recently came up with this solution so I could leverage my custom scope when grabbing the scope from a controller using angular.element.  It works well and with the <T extends IScope> it ensures that you can only set it to an interface that extends IScope.
2016-03-28 08:58:10 -04:00
Thanabodee Charoenpiriyakij 5256422ee7 angularjs: Support HttpParamSerializer interface 2016-03-20 15:19:37 +07:00
Sebastien 36f1d8d82f Updated to improve IComponentOptions 2016-03-18 11:21:30 +01:00
Sebastien 742354b669 Merge remote-tracking branch 'upstream/master' 2016-03-18 08:28:41 +01:00
vvakame 7de6c3dd94 Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
vvakame 14fe4313f4 replace internal module to namespace 2016-03-17 02:18:10 +09:00
vvakame 56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
thorn0 18c25bcac5 angularjs: fix typings for $q.all(array) 2016-03-15 02:54:37 +02:00
Sebastien b2da5285ff Updated angularjs IComponentOptions (fixes #8515) 2016-03-12 02:49:58 +01:00
Masahiro Wakame 3cccf14497 Merge pull request #8445 from Burgov/angularcontrollerservice
fix ControllerService arguments
2016-03-11 00:38:52 +09:00
Masahiro Wakame 320639ffbb Merge pull request #8429 from ashwin027/missingoption
Added missing property
2016-03-11 00:06:25 +09:00
Masahiro Wakame 58f6485525 Merge pull request #8428 from ashwin027/angularfix
Added an interface for IModelOptions.
2016-03-11 00:05:29 +09:00
Masahiro Wakame 046b3cf669 Merge pull request #8419 from DavidKDeutsch/angular
Making return types of  $on and  $watch more specific
2016-03-10 23:14:41 +09:00
Masahiro Wakame 8a88c85be0 Merge pull request #8150 from mmiszy/angular
Update AngularJS to 1.5
2016-03-10 22:26:45 +09:00
Bart van den Burg 69d2fb94a9 fix ControllerService arguments
See https://github.com/angular/angular.js/blob/v1.5.0-beta.0/src/ng/controller.js#L86
2016-03-08 18:13:20 +01:00
Ashwin 1c4a98f368 Added missing property
Added missing property in the IFormController interface
2016-03-07 23:29:19 -07:00
Ashwin 9864cb1709 Added an interface for IModelOptions.
Added an interface for IModelOptions.
2016-03-07 23:18:27 -07:00
David DeutschandDavid Deutsch f5a9c4bd4c Making return types of $on() and $watch() more specific 2016-03-07 10:47:18 -05:00
Matthew Hill c2ae01b0b4 adds strictDi to angular.auto.IInjectorService 2016-03-02 14:37:48 +00:00
John Reilly 49a2473350 Update angular.d.ts
Added JSDoc for documented service methods
2016-03-01 13:52:51 +00:00
Michal Miszczyszyn 65347efe70 Update AngularJS to 1.5 2016-02-20 21:54:16 +01:00
Boris Prpic 1c4a34873c Component controller can be array
angular.module(.....).component("componentName", {
  controller: ["$rootScope",function($rootScope) {
}],
  template: ....
}
2016-02-13 21:54:57 +01:00
Boris Prpic 7677a9f3aa Update angular.d.ts 2016-02-13 02:30:12 +01:00
Damiano 824761509f Missing "require" property on IComponentOptions
Added missing require property on IComponentOptions
2016-02-12 23:27:38 +01:00
Boris Prpic f8e2d6025e Fixes require again 2016-02-08 00:04:14 +01:00
Boris Prpic 119c65b311 Fixed require
In component require works different from directive.
Now its Object
2016-02-08 00:00:17 +01:00
Boris Prpic 7b8b362742 Updates IComponentOptions for angular 1.5 components
As per https://docs.angularjs.org/guide/component

components does not support restrict or isolate but they do require
2016-02-07 21:11:51 +01:00
Masahiro Wakame 17ef404520 Merge pull request #7967 from jarnova/master
modified IDeferred resolve method to allow passing a promise of type …
2016-02-07 01:44:34 +09:00
Jarno Välkki 94095ef4ee modified IDeferred resolve method to allow passing a promise of type T so a deferred can be resolved with a promise 2016-02-04 16:01:35 +02:00