System Information
- Strapi Version: 4.14.3
- Operating System: macOS
- Database: MySQL
- Node Version: 16
- NPM Version: 8
- Yarn Version:
What is the type of event
?
// src/api/page/content-types/page/lifecycles.ts
export default {
afterUpdate(event: ???) {
console.log(event);
}
};
EDIT
Best type I found is:
import { Event } from '@strapi/database/lib/lifecycles';
If this is the correct type to use it would be nice to export it at the top level, or provide a type for the object exported:
const config: Strapi.Lifecycles = {
afterUpdate(event) {
// event type is correctly inferred as `Event`
}
};
export default config;