mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 08:58:23 +08:00
Return typed definition from toJSON method (#8859)
* Return typed definition from toJSON method * Test toJSON returns IMyResource
This commit is contained in:
committed by
Masahiro Wakame
parent
22d18908f7
commit
e684481e0c
@@ -98,9 +98,7 @@ resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () {
|
||||
|
||||
var promise : angular.IPromise<IMyResource>;
|
||||
var arrayPromise : angular.IPromise<IMyResource[]>;
|
||||
var json: {
|
||||
[index: string]: any;
|
||||
};
|
||||
var json: IMyResource;
|
||||
|
||||
promise = resource.$delete();
|
||||
promise = resource.$delete({ key: 'value' });
|
||||
|
||||
4
angularjs/angular-resource.d.ts
vendored
4
angularjs/angular-resource.d.ts
vendored
@@ -153,9 +153,7 @@ declare namespace angular.resource {
|
||||
/** the promise of the original server interaction that created this instance. **/
|
||||
$promise : angular.IPromise<T>;
|
||||
$resolved : boolean;
|
||||
toJSON: () => {
|
||||
[index: string]: any;
|
||||
}
|
||||
toJSON(): T;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user