(func: ObjectParserArrayFunc<P>)
| 142 | } |
| 143 | |
| 144 | array(func: ObjectParserArrayFunc<P>): this { |
| 145 | const prop = this._property; |
| 146 | if (Array.isArray(prop)) { |
| 147 | for (let i = 0; i < prop.length; i++) { |
| 148 | const item = new ObjectParserProp(prop[i], this._context, createStack(this._stack, i)); |
| 149 | func(item as any, i, prop); |
| 150 | } |
| 151 | } else { |
| 152 | this._context.onError(new ObjectParserError(this._stack, 'Property is not an array.')); |
| 153 | } |
| 154 | return this; |
| 155 | } |
| 156 | |
| 157 | arrayRaw(func: ObjectParserArrayRawFunc<P>): this { |
| 158 | const prop = this._property; |
nothing calls this directly
no test coverage detected