File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 logLevel : ( options . logLevel as LogLevel ) ?? defaultOptions . logLevel ,
6868 }
6969
70- await generate ( config )
70+ const stats = await generate ( config )
71+
72+ // Exit with appropriate code based on results
73+ if ( stats . filesFailed > 0 && stats . filesGenerated === 0 ) {
74+ // All files failed
75+ process . exit ( 1 )
76+ }
77+ else if ( stats . filesFailed > 0 ) {
78+ // Some files failed (partial success)
79+ process . exit ( 2 )
80+ }
81+ // Success - exit code 0 (default)
7182 }
7283 catch ( error ) {
7384 console . error ( 'Error generating .d.ts files:' , error )
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ export async function checkIsolatedDeclarations(options?: DtsGenerationConfig):
7979
8080 return false
8181 }
82- // eslint-disable-next-line unused-imports/no-unused-vars
83- catch ( error ) {
82+ catch {
8483 return false
8584 }
8685}
You can’t perform that action at this time.
0 commit comments