mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
@@ -385,8 +385,14 @@ Animal['findByName']('fido', function(err: any, animals: any) {
|
||||
animalSchema.virtual('name.full').get(function () {
|
||||
return this.name.first + ' ' + this.name.last;
|
||||
});
|
||||
new mongoose.Schema({
|
||||
child: { name: String }
|
||||
var childSchema = new mongoose.Schema({ name: String });
|
||||
var parentSchema = new mongoose.Schema({
|
||||
children: [childSchema],
|
||||
child: childSchema,
|
||||
name: {
|
||||
index: true,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
new mongoose.Schema({
|
||||
eggs: {
|
||||
|
||||
Reference in New Issue
Block a user