@@ -15,7 +15,7 @@ type ExceptionParams = {
1515 name : string ;
1616} ;
1717
18- export type ExceptionInstance < TParams extends ExceptionParams , TOptions extends ExceptionOptions > = Error & {
18+ type ExceptionInstance < TParams extends ExceptionParams , TOptions extends ExceptionOptions > = Error & {
1919 cause : TOptions [ 'cause' ] ;
2020 details : TOptions [ 'details' ] ;
2121 name : TParams [ 'name' ] ;
@@ -28,11 +28,11 @@ type ExceptionConstructorArgs<TParams extends ExceptionParams, TOptions extends
2828 ? [ TOptions ]
2929 : [ message : string , options : TOptions ] ;
3030
31- export type ExceptionConstructor < TParams extends ExceptionParams , TOptions extends ExceptionOptions > = new (
31+ type ExceptionConstructor < TParams extends ExceptionParams , TOptions extends ExceptionOptions > = new (
3232 ...args : ExceptionConstructorArgs < TParams , TOptions >
3333) => ExceptionInstance < TParams , TOptions > ;
3434
35- export abstract class BaseException < TParams extends ExceptionParams , TOptions extends ExceptionOptions >
35+ abstract class BaseException < TParams extends ExceptionParams , TOptions extends ExceptionOptions >
3636 extends Error
3737 implements ExceptionInstance < TParams , TOptions >
3838{
@@ -47,7 +47,7 @@ export abstract class BaseException<TParams extends ExceptionParams, TOptions ex
4747 }
4848}
4949
50- export class ExceptionBuilder < TParams extends ExceptionParams | undefined , TOptions extends ExceptionOptions > {
50+ class ExceptionBuilder < TParams extends ExceptionParams | undefined , TOptions extends ExceptionOptions > {
5151 params ?: TParams ;
5252
5353 build ( ) : [ TParams ] extends [ ExceptionParams ] ? ExceptionConstructor < TParams , TOptions > : never ;
@@ -74,3 +74,6 @@ export class ExceptionBuilder<TParams extends ExceptionParams | undefined, TOpti
7474 return this as unknown as ExceptionBuilder < TUpdatedParams , TOptions > ;
7575 }
7676}
77+
78+ export type { ExceptionConstructor , ExceptionInstance } ;
79+ export { BaseException , ExceptionBuilder } ;
0 commit comments