mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-06 16:20:26 +08:00
Fix TS errors for stamplay-js-sdk
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
var userFn = Stamplay.User();
|
||||
var user = new userFn.Model;
|
||||
|
||||
var tags = new Stamplay.Cobject('tag').Collection;
|
||||
var colTags = new Stamplay.Cobject('tag');
|
||||
var tags = colTags.Collection;
|
||||
|
||||
// Signing up
|
||||
var registrationData = {
|
||||
@@ -21,7 +21,8 @@ user.signup(registrationData).then(function(){
|
||||
|
||||
|
||||
// Action
|
||||
var fooMod = new Stamplay.Cobject('foo').Model;
|
||||
var colFoo = new Stamplay.Cobject('foo');
|
||||
var fooMod = colFoo.Model;
|
||||
fooMod.fetch(5).then(
|
||||
function(){
|
||||
return fooMod.upVote()
|
||||
@@ -29,7 +30,7 @@ fooMod.fetch(5).then(
|
||||
).then(
|
||||
function(){
|
||||
//success callback
|
||||
}, function( err ){
|
||||
}, function( err : any ){
|
||||
//error callback
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+4
-4
@@ -10,10 +10,10 @@ declare module Stamplay {
|
||||
export interface IStamplayModel {
|
||||
signup({}) : PromisesAPlus.Thenable<any>
|
||||
new() : IStamplayModel
|
||||
get(property : string)
|
||||
set(property : string, value: any)
|
||||
unset(property : string)
|
||||
fetch(id : any)
|
||||
get(property : string) : any
|
||||
set(property : string, value: any) : void
|
||||
unset(property : string) : void
|
||||
fetch(id : any) : PromisesAPlus.Thenable<any>
|
||||
destroy() : PromisesAPlus.Thenable<any>
|
||||
save({}?) : PromisesAPlus.Thenable<any>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"module": "amd"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user