MCPcopy Create free account
hub / github.com/Automattic/mongoose / pluginMethods

Function pluginMethods

test/types/plugin.test.ts:18–22  ·  view source on GitHub ↗
(schema: Schema<Test, any, TestInstanceMethods>)

Source from the content-addressed store, hash-verified

16}
17
18function pluginMethods(schema: Schema<Test, any, TestInstanceMethods>): void {
19 schema.methods.doSomething = function() {
20 return 'test';
21 };
22}
23
24function pluginStatics(schema: Schema<Test, TestModel, any, TestQueryHelpers, any, TestStaticMethods>): void {
25 schema.statics.findSomething = function() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected