* DynamicArray is an interface representing a handler for a dynamic array Object. Such an object can be created using the Runtime.NewDynamicArray() method. Any integer property key or a string property key that can be parsed into an int value (including negative ones) is treated as an index and pas
| 47 | silent code breaks when this interface changes. |
| 48 | */ |
| 49 | type DynamicArray interface { |
| 50 | // Len returns the current array length. |
| 51 | Len() int |
| 52 | // Get an item at index idx. Note that idx may be any integer, negative or beyond the current length. |
| 53 | Get(idx int) Value |
| 54 | // Set an item at index idx. Note that idx may be any integer, negative or beyond the current length. |
| 55 | // The expected behaviour when it's beyond length is that the array's length is increased to accommodate |
| 56 | // the item. All elements in the 'new' section of the array should be zeroed. |
| 57 | Set(idx int, val Value) bool |
| 58 | // SetLen is called when the array's 'length' property is changed. If the length is increased all elements in the |
| 59 | // 'new' section of the array should be zeroed. |
| 60 | SetLen(int) bool |
| 61 | } |
| 62 | |
| 63 | type baseDynamicObject struct { |
| 64 | val *Object |
no outgoing calls
no test coverage detected
searching dependent graphs…