File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -483,11 +483,7 @@ abstract class NameRegistryImpl implements NameRegistry {
483483 }
484484
485485 makeValid ( primer : string ) : string {
486- if (
487- isValidIdentifier ( primer ) &&
488- ! this . #usedNames. has ( primer ) &&
489- ! this . #isUsedInBlocksBefore( primer )
490- ) {
486+ if ( isValidIdentifier ( primer ) && ! this . isUsed ( primer ) ) {
491487 this . #usedBlockScopeNames?. add ( primer ) ;
492488 return primer ;
493489 }
Original file line number Diff line number Diff line change @@ -324,6 +324,12 @@ export interface ResolutionCtx {
324324 */
325325 withRenamed < T > ( item : object , name : string | undefined , callback : ( ) => T ) : T ;
326326
327+ /**
328+ * It takes a resource instead of a primer solely because it needs to
329+ * pass the resource to a potential namespace listener.
330+ *
331+ * TODO: Remove namespace listeners, then accept a primer instead of a resource.
332+ */
327333 getUniqueName ( resource : object ) : string ;
328334 makeNameValid ( name : string ) : string ;
329335}
You can’t perform that action at this time.
0 commit comments