Commit Graph

78 Commits

Author SHA1 Message Date
Andy
ae4fe7b6de Use "lib" in tsconfigs instead of "target". (#13968)
* Use "lib" in tsconfigs instead of "target".

Only add "dom" to libraries that need it. This is determined by a script, so many libraries that have "dom" maybe should not.

* Update new-package and readme

* Add back "target" where necessary
2017-01-18 07:51:51 -08:00
Andy
a4bd9fa3c1 Add "noImplicitThis" to all tsconfig.json (#13446)
* Add "noImplicitThis" to all tsconfig.json

* Use `"noImplicitThis": false` on packages with broken tests.
2016-12-19 14:11:46 -08:00
Nathan Shively-Sanders
983c93531a Merge branch 'types-2.0' into types-merge-20161118 2016-11-21 16:16:59 -08:00
Mine Yalcinalp Starks
ece81946f7 Merge commit 'upstream/master~500' into types-2.0 2016-11-18 13:09:27 -08:00
Andy Hanson
04b4272974 Merge remote-tracking branch 'origin/master' into merge_23sep 2016-09-23 07:24:23 -07:00
Andy
8e571d7b13 Merge pull request #11230 from ngraef/patch-2
[restangular]: add route-bound methods for scoped service
2016-09-21 10:43:30 -07:00
Andy Hanson
91d1d6d60f Merge remote-tracking branch 'origin/master' into merge_21sep 2016-09-21 09:45:05 -07:00
Nick Graef
50155318b2 fix function signatures (#11261)
Documentation: https://github.com/mgonto/restangular#restangular-methods

According to the documentation and source code, `all` and `allUrl` return collections, not elements.
Additionally, the `post` signature without `subElement` is only available on collections, not elements.
2016-09-19 15:16:16 +09:00
Nick Graef
27347de728 add route-bound methods for scoped service
Documentation: https://github.com/mgonto/restangular#decoupled-restangular-service

When configured via `Restangular.service('route')`, the route is bound to some functions. This change overrides those functions with the correct signatures.
2016-09-14 14:13:28 -05:00
Ryan Cavanaugh
a4f5ae3098 Merge commit 'upstream/master~250' into merge_7_25 2016-07-26 18:03:56 -07:00
Ryan Cavanaugh
5e9440c8ad Merge commit 'upstream/master~700' into merge_7_25
# Conflicts:
#	angular-ui-router/angular-ui-router.d.ts
#	bookshelf/bookshelf-tests.ts
#	bookshelf/bookshelf.d.ts
#	enzyme/enzyme-tests.tsx
#	enzyme/enzyme.d.ts
#	escodegen/escodegen-tests.ts
#	helmet/helmet.d.ts
#	joi/joi.d.ts
#	knex/knex-tests.ts
#	moment/index.d.ts
#	mongoose/index.d.ts
#	pg/pg.d.ts
#	react-select/react-select-tests.tsx
#	soap/index.d.ts
#	ssh2/ssh2.d.ts
#	turf/turf-tests.ts
#	underscore.string/underscore.string.d.ts
2016-07-25 16:10:34 -07:00
Ryan Cavanaugh
9d7d5a209a Getting types-2.0 passing CI 2016-07-14 18:13:43 -07:00
Ryan Cavanaugh
a5f4d50ccc Fix tsconfig files for new option name / behavior.
Also fixes some inconsistent whitespace.
2016-07-12 13:54:56 -07:00
Mohamed Hegazy
61fa2391a4 Replace references to angularjs with angular to match package name 2016-07-07 17:39:27 -07:00
Mohamed Hegazy
a5d477d085 Replace references to angularjs with angular to match package name 2016-07-07 15:12:24 -07:00
Raghav Katyal
395c4e1639 Turning on consistent casing flag and fixing failures 2016-06-30 15:14:49 -07:00
Mohamed Hegazy
81ea588f58 Merge pull request #8380 from seonetartem/patch-1
Update restangular.d.ts
2016-06-26 16:17:43 -07:00
Raghav Katyal
c17b1b78b8 OldUMD and many other module fixes. 2016-06-20 14:15:13 -07:00
Brendon Colburn
1f8e49ff30 Add some properties to Restangularized Elements (#9240)
When an element is restangularized it often has one to many of the properties added in this proposed code change.  Leveraging the route, id, and reqParams gives greater functionality to restangularized objects in typescript projects.
2016-05-14 23:26:58 +09:00
Ryan Cavanaugh
bfd400a8f8 Add noEmit to all config files 2016-05-10 12:24:49 -07:00
Ryan Cavanaugh
e808e8e062 Remove unneeded references 2016-05-10 12:22:25 -07:00
Ryan Cavanaugh
50387d4046 Change relative reference paths to types references. Errors incoming... 2016-05-09 18:06:27 -07:00
Ryan Cavanaugh
49b1ac6a38 Rename all entry points to index.d.ts and explicitify all file lists 2016-05-09 17:29:10 -07:00
Ryan Cavanaugh
ab2b4191c5 Add typesRoot to all config files 2016-05-09 13:52:25 -07:00
Ryan Cavanaugh
ded70421be Turn off strict null checks 2016-05-04 15:08:38 -07:00
Ryan Cavanaugh
69d1929d8a Add tsconfig.json files 2016-05-04 14:14:39 -07:00
Ryan Cavanaugh
e7c111c4b7 Merge remote-tracking branch 'upstream/master' into types2.0
Add tsconfig files everywhere

# Conflicts:
#	azure-mobile-services-client/AzureMobileServicesClient.d.ts
#	bookshelf/bookshelf.d.ts
#	hapi/hapi.d.ts
#	helmet/helmet.d.ts
#	mongodb/mongodb.d.ts
#	nock/nock.d.ts
#	react-bootstrap/react-bootstrap.d.ts
#	react-helmet/react-helmet.d.ts
#	restify/restify.d.ts
#	sequelize/sequelize.d.ts
2016-04-27 20:40:21 -07:00
Ryan Cavanaugh
541e24b685 Fix angularjs/angular; 'export declare'/'declare export' 2016-04-25 13:02:25 -07:00
Péter Babcsány
47363c7222 Update restangular.IProvider.setErrorInterceptor method signature to be compatible with Restangular 1.5 (#9032) 2016-04-23 15:22:08 +09: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
artem
90ecfb5cab Update restangular.d.ts 2016-03-04 12:10:52 +02:00
Tadeusz Hucal
f2ae460e17 Update module name from ng to angular 2015-11-13 19:24:04 +01:00
Tadeusz Hucal
158f0715ab Restangular: restore synchronization with Angular's request configuration 2015-10-03 18:58:28 +02:00
Lukas Sembera
f38b15bc38 Add missing headers() function to restangular's IResponse 2015-09-20 19:46:51 +02:00
Adam Martin
3c79b26f0b Allow for ES6 Import of Restangular 2015-08-21 12:13:17 +01:00
Sebastian Clausen
1bd72e00bf Restangular: ICollection extends Array to inherit splice and indexOf 2015-08-03 11:31:47 +02:00
Matthew Hill
7488c8df11 extends restangular IProvider in IService interface 2015-06-29 23:21:37 +01:00
Max Nylin
16744e323f Added definition of extendModel() in IService for Restangular 2015-05-12 11:45:48 +02:00
Marvin Luchs
a013599373 Added missing plain() and clone() methods to Restangular's IElement and ICollection
restangularizeCollection() [1] and restangularizeElem() [2] are used to
create objects that implement IElement and ICollection respectively.
Both use restangularizeBase() [3] which adds the clone() and plane()
methods.

Therefore both IElement and ICollection should both implement clone()
and plain(). Additionally I added a generic variant of the already
existing plain() method in IElement to both IElement and ICollection.

[1]
https://github.com/mgonto/restangular/blob/master/src/restangular.js#L982
[2]
https://github.com/mgonto/restangular/blob/master/src/restangular.js#L951
[3]
https://github.com/mgonto/restangular/blob/master/src/restangular.js#L764
2015-04-29 13:38:43 +02:00
Marvin Luchs
b9e995eb9b ICollectionPromise<T> should extend ng.IPromise with an array of T
ICollectionPromise<T> extends ng.IPromise<T> is the equivalent of
interface IPromise<T> extends ng.IPromise<T> for arrays of T. Therefore
it makes no sense to extend ng.IPromise with just T. Instead it has to
be an array of T.

The consequence of this bug can be observed when calling

Restangular.all('someEntity').getList<SomeEntity>().then((entities) =>
{...})

In this case the TypeScript compiler handles entities as SomeEntity, not
SomeEntity[].
2015-04-29 10:09:09 +02:00
Marvin Luchs
cc0537a0ac "parent" argument of Restangular.service() should be optional
The documentation as well as the actual source code of Restangular
define the parent argument of Restangular.service(route, parent) as
optional:

https://github.com/mgonto/restangular#decoupled-restangular-service

function toService(route, parent) {
[...]
var collection = (parent || service).all(route);
2015-04-27 13:01:12 +02:00
Masahiro Wakame
334f1ac57f Merge pull request #3977 from samherrmann/add-missing-restangular-methods
Add missing plain and clone method to restangular IElement
2015-03-29 22:51:55 +09:00
Sam Herrmann
300d87447e Add missing plain and clone method to restangular IElement
See https://github.com/mgonto/restangular#element-methods for documentation on the methods.
2015-03-26 22:41:54 -04:00
Dominik Münch
f5855b4d5b restangular: Add missing save method 2015-03-26 14:37:10 +01:00
vvakame
070fd9d268 remove not required tscparams 2015-01-02 20:48:15 +09:00
Mohamed Hegazy
2aaa293cb1 Remove quotes from response files 2014-09-02 14:53:39 -07:00
Jon Stelly
a32e2bc731 Restangular: fix test compilation 2014-08-26 08:33:27 -05:00
Jon Stelly
b57a5b1072 Restangular: add generic overloads for get<T>(), getAll<T>() and post<T>() 2014-08-26 08:23:55 -05:00