mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Change object user to object model
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
var userFn = Stamplay.User();
|
||||
var user = new userFn.Model;
|
||||
var colTags = new Stamplay.Cobject('tag');
|
||||
var tags = colTags.Collection;
|
||||
var colTags = Stamplay.Cobject('tag');
|
||||
var tags = new colTags.Collection();
|
||||
|
||||
// Signing up
|
||||
var registrationData = {
|
||||
@@ -21,8 +21,8 @@ user.signup(registrationData).then(function(){
|
||||
|
||||
|
||||
// Action
|
||||
var colFoo = new Stamplay.Cobject('foo');
|
||||
var fooMod = colFoo.Model;
|
||||
var colFoo = Stamplay.Cobject('foo');
|
||||
var fooMod = new colFoo.Model();
|
||||
fooMod.fetch(5).then(
|
||||
function(){
|
||||
return fooMod.upVote()
|
||||
|
||||
Vendored
+6
-8
@@ -16,20 +16,18 @@ declare module Stamplay {
|
||||
fetch(id : any) : PromisesAPlus.Thenable<any>
|
||||
destroy() : PromisesAPlus.Thenable<any>
|
||||
save({}?) : PromisesAPlus.Thenable<any>
|
||||
upVote() : PromisesAPlus.Thenable<any>
|
||||
}
|
||||
|
||||
export interface IStamplayAction {
|
||||
new() : IStamplayModel
|
||||
upVote() : PromisesAPlus.Thenable<any>
|
||||
}
|
||||
|
||||
export interface IStamplayUser {
|
||||
export interface IStamplayObject {
|
||||
Model : IStamplayModel
|
||||
Collection : any
|
||||
|
||||
}
|
||||
|
||||
export interface StamplayStatic {
|
||||
User() : IStamplayUser
|
||||
Cobject(collection : string) : void
|
||||
User() : IStamplayObject
|
||||
Cobject(object : string) : IStamplayObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user