(internalInstance: InternalInstance)
| 190 | } |
| 191 | |
| 192 | function getID(internalInstance: InternalInstance): number { |
| 193 | if (typeof internalInstance !== 'object' || internalInstance === null) { |
| 194 | throw new Error('Invalid internal instance: ' + internalInstance); |
| 195 | } |
| 196 | if (!internalInstanceToIDMap.has(internalInstance)) { |
| 197 | const id = getUID(); |
| 198 | internalInstanceToIDMap.set(internalInstance, id); |
| 199 | idToInternalInstanceMap.set(id, internalInstance); |
| 200 | } |
| 201 | return ((internalInstanceToIDMap.get(internalInstance): any): number); |
| 202 | } |
| 203 | |
| 204 | function areEqualArrays(a: Array<any>, b: Array<any>) { |
| 205 | if (a.length !== b.length) { |
no test coverage detected