(type: TriggerOpTypes)
| 75 | } |
| 76 | |
| 77 | function createReadonlyMethod(type: TriggerOpTypes): Function { |
| 78 | return function (this: CollectionTypes, ...args: unknown[]) { |
| 79 | if (__DEV__) { |
| 80 | const key = args[0] ? `on key "${args[0]}" ` : `` |
| 81 | warn( |
| 82 | `${capitalize(type)} operation ${key}failed: target is readonly.`, |
| 83 | toRaw(this), |
| 84 | ) |
| 85 | } |
| 86 | return type === TriggerOpTypes.DELETE |
| 87 | ? false |
| 88 | : type === TriggerOpTypes.CLEAR |
| 89 | ? undefined |
| 90 | : this |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | type Instrumentations = Record<string | symbol, Function | number> |
| 95 |
no test coverage detected