16 lines
355 B
TypeScript
Raw Normal View History

2022-04-12 15:42:57 +02:00
import type { Strapi } from '@strapi/strapi';
2022-04-12 15:30:09 +02:00
export default {
register({ strapi }: { strapi: Strapi }) {
// No error when trying the access & set the
strapi.customAddMethod = (n1, n2) => {
return n1 + n2;
};
},
bootstrap({ strapi }: { strapi: Strapi }) {
// This should return 42
strapi.customAddMethod(11, 31);
2022-04-12 15:30:09 +02:00
},
};