import type { ErrlyOptions } from 'keloola-errly-js'; interface AstroInjectScript { (stage: 'page' | 'head-inline' | 'before-hydration' | 'page-ssr', content: string): void; } interface AstroIntegration { name: string; hooks: { 'astro:config:setup'?: (options: { injectScript: AstroInjectScript; }) => void; }; } /** * Astro integration untuk keloola-errly-js. * * Pakai di `astro.config.mjs`: * ```js * import { errly } from 'keloola-errly-js/astro' * * export default defineConfig({ * integrations: [ * errly({ apiKey: 'proj_xxx', dsn: 'https://errly.yourdomain.com' }), * ], * }) * ``` * * Integration ini meng-inject client script yang memanggil `Errly.init()` di * setiap halaman. Global JS error & unhandled promise rejection otomatis * tertangkap lewat handler bawaan SDK. */ export declare function errly(options: ErrlyOptions): AstroIntegration; export default errly;