(target, name)
| 82 | |
| 83 | const arrayTraps = { |
| 84 | get(target, name) { |
| 85 | const adm: ObservableArrayAdministration = target[$mobx] |
| 86 | if (name === $mobx) { |
| 87 | return adm |
| 88 | } |
| 89 | if (name === "length") { |
| 90 | return adm.getArrayLength_() |
| 91 | } |
| 92 | if (typeof name === "string" && !isNaN(name as any)) { |
| 93 | return adm.get_(parseInt(name)) |
| 94 | } |
| 95 | if (hasProp(arrayExtensions, name)) { |
| 96 | return arrayExtensions[name] |
| 97 | } |
| 98 | return target[name] |
| 99 | }, |
| 100 | set(target, name, value): boolean { |
| 101 | const adm: ObservableArrayAdministration = target[$mobx] |
| 102 | if (name === "length") { |
nothing calls this directly
no test coverage detected