fix(gen): preserve fromTypes compiler defaults#342
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
fromTypes(..., { compilerOptions })is usedrootDirto the project root and keep declaration output insidetmpRoot/distcompilerOptionsoverrideWhy
compilerOptionspreviously replaced the whole generated block. Passing an override such as{ strict: true }dropped required declaration emit settings likedeclaration,emitDeclarationOnly,noEmit: false, andoutDir. With newer TypeScript behavior, missingrootDir/outDircan also let generated.d.tsfiles appear beside project sources instead of staying in the temporary directory.Tests
PATH="$PWD/node_modules/.bin:$PATH" bun test test/gen/index.test.ts --timeout 20000git diff --checkbun run buildPATH="$PWD/node_modules/.bin:$PATH" bun run testCloses elysiajs/elysia#1855