(self: any, key: PropertyKey, shouldBeArray: boolean)
| 1871 | const containers = new WeakSet<object>() |
| 1872 | |
| 1873 | function getOrCreateContainer(self: any, key: PropertyKey, shouldBeArray: boolean): any { |
| 1874 | const current = Object.hasOwn(self, key) ? self[key] : undefined |
| 1875 | if (containers.has(current) && Array.isArray(current) === shouldBeArray) { |
| 1876 | return current |
| 1877 | } |
| 1878 | const container = shouldBeArray ? [] : {} |
| 1879 | containers.add(container) |
| 1880 | InternalRecord.assignProperty(self, key, container) |
| 1881 | return container |
| 1882 | } |
| 1883 | |
| 1884 | bracketPathEntries.forEach(([key, value]) => { |
| 1885 | const tokens = bracketPathToTokens(key) |
no test coverage detected