@@ -114,6 +114,7 @@ export class Options {
114
114
( reader ) => reader . supportsPackages ,
115
115
) ;
116
116
options . _declarations = new Map ( this . _declarations ) ;
117
+ options . reset ( ) ;
117
118
118
119
return options ;
119
120
}
@@ -168,7 +169,7 @@ export class Options {
168
169
const declaration = this . getDeclaration ( name ) ;
169
170
if ( ! declaration ) {
170
171
throw new Error (
171
- " Cannot reset an option which has not been declared." ,
172
+ ` Cannot reset an option ( ${ name } ) which has not been declared.` ,
172
173
) ;
173
174
}
174
175
@@ -251,7 +252,9 @@ export class Options {
251
252
isSet ( name : NeverIfInternal < string > ) : boolean ;
252
253
isSet ( name : string ) : boolean {
253
254
if ( ! this . _declarations . has ( name ) ) {
254
- throw new Error ( "Tried to check if an undefined option was set" ) ;
255
+ throw new Error (
256
+ `Tried to check if an undefined option (${ name } ) was set` ,
257
+ ) ;
255
258
}
256
259
return this . _setOptions . has ( name ) ;
257
260
}
@@ -302,7 +305,7 @@ export class Options {
302
305
setValue ( name : string , value : unknown , configPath ?: string ) : void {
303
306
if ( this . isFrozen ( ) ) {
304
307
throw new Error (
305
- " Tried to modify an option value after options have been frozen." ,
308
+ ` Tried to modify an option ( ${ name } ) value after options have been frozen.` ,
306
309
) ;
307
310
}
308
311
@@ -385,7 +388,7 @@ export class Options {
385
388
) {
386
389
if ( this . isFrozen ( ) ) {
387
390
throw new Error (
388
- "Tried to modify an option value after options have been sealed ." ,
391
+ "Tried to modify compiler options after options have been frozen ." ,
389
392
) ;
390
393
}
391
394
@@ -454,7 +457,7 @@ export function Option<K extends keyof TypeDocOptionMap>(name: K) {
454
457
} ,
455
458
set ( _value : never ) {
456
459
throw new Error (
457
- " Options may not be set via the Option decorator" ,
460
+ ` Options may not be set via the Option decorator when setting ${ name } ` ,
458
461
) ;
459
462
} ,
460
463
} ;
0 commit comments