2017-03-16 58 views

回答

0

你需要導入DocumentBase對象,那麼你就可以訪問這些屬性。

var documentdb = require('documentdb'), 
DocumentClient = documentdb.DocumentClient, 
DocumentBase = documentdb.DocumentBase; 

'mytriggerTrigger': { 
    id: 'triggerid', 
    serverScript: function Foo() { 
     // code omitted 
    }, 
    triggerType: DocumentBase.TriggerType.Pre, 
    triggerOperation : DocumentBase.TriggerOperation.Create 
}