Bump deps (#4037)
* Bump deps * Bump * revamp comments * Only use un-aliased primitives * Revert "Only use un-aliased primitives" This reverts commit 93d7e28f3a73351899789acc0914b75b421d4c11.
This commit is contained in:
@@ -327,10 +327,17 @@ export class TypeRegistry implements Registry {
|
||||
}
|
||||
|
||||
public getClassName (Type: Constructor): string | undefined {
|
||||
const entry = [...this.#classes.entries()].find(([, Clazz]) => Type === Clazz);
|
||||
// we cannot rely on export order (anymore, since babel/core 7.15.8), so in the case of
|
||||
// items such as u32 & U32, we get the lowercase versions here... not quite as optimal
|
||||
// (previously this used to be a simple find & return)
|
||||
const names = [...this.#classes.entries()]
|
||||
.filter(([, Clazz]) => Type === Clazz)
|
||||
.map(([name]) => name)
|
||||
.sort()
|
||||
.reverse();
|
||||
|
||||
return entry
|
||||
? entry[0]
|
||||
return names.length
|
||||
? names[0]
|
||||
: undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user