import type { BunPlugin } from 'bun'; export declare const ANGULAR_LINKER_CANDIDATE_RE: RegExp; /** * Bun bundler plugin that runs the Angular Linker on partially compiled * Angular libraries at build time. Converts ɵɵngDeclare* declarations * into fully linked code. * * The `linkerJitMode` flag controls whether NgModule definitions retain * `declarations`/`exports` (JIT-mode, required when consumer code is * runtime-compiled) or strip them (AOT-mode, smaller output but only * correct when consumer components have ɵcmp.dependencies baked in by * the Angular compiler-cli). * * In AbsoluteJS dev/HMR, user components are TypeScript-transpiled via * `compileAngularFileJIT` and rely on @angular/compiler at runtime — * that runtime JIT path reads `NgModule.ɵmod.declarations` to find * directives like FormGroupDirective. Linking vendor code in AOT mode * (the default) silently breaks dev because declarations get stripped * and runtime JIT then can't resolve `[formGroup]`, `[ngIf]`, etc. So * dev/HMR builds must use `linkerJitMode: true`. Production AOT builds * use `linkerJitMode: false` (matches AOT'd user components). * * Cache key includes mode so dev and prod artifacts don't collide. */ export declare const createAngularLinkerPlugin: (linkerJitMode: boolean) => BunPlugin; /** Default AOT-mode plugin instance — keep for callers that don't need * to choose. Production AOT builds and any callsite that AOT-compiles * user components alongside vendor should use this. */ export declare const angularLinkerPlugin: BunPlugin;