mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
17 lines
450 B
TypeScript
17 lines
450 B
TypeScript
/// <reference path="couchbase.d.ts"/>
|
|
|
|
import couchbase = require('couchbase');
|
|
var db = new couchbase.Connection({ bucket: "default" }, function (err) {
|
|
if (err) throw err;
|
|
|
|
db.set('testdoc', { name: 'Frank' }, function (err, result) {
|
|
if (err) throw err;
|
|
|
|
db.get('testdoc', function (err, result) {
|
|
if (err) throw err;
|
|
|
|
console.log(result.value);
|
|
// {name: Frank}
|
|
});
|
|
});
|
|
}); |