Add registry to reserved (rename w/ underscore) list (#5375)

* Add registry to reserved (rename w/ underscore) list

* Ordering
This commit is contained in:
Jaco
2022-12-13 08:22:23 +02:00
committed by GitHub
parent d91b3cb501
commit 073a06edb4
@@ -84,7 +84,12 @@ const BITVEC_NS = [...BITVEC_NS_LSB, ...BITVEC_NS_MSB];
const WRAPPERS = ['BoundedBTreeMap', 'BoundedBTreeSet', 'BoundedVec', 'Box', 'BTreeMap', 'BTreeSet', 'Cow', 'Option', 'Range', 'RangeInclusive', 'Result', 'WeakBoundedVec', 'WrapperKeepOpaque', 'WrapperOpaque'];
// These are reserved and/or conflicts with built-in Codec or JS definitions
const RESERVED = ['entries', 'hash', 'keys', 'new', 'size'];
const RESERVED = [
// JS reserved words
'entries', 'keys', 'new', 'size',
// exposed by all Codec objects
'hash', 'registry'
];
// Remove these from all paths at index 1
const PATH_RM_INDEX_1 = ['generic', 'misc', 'pallet', 'traits', 'types'];