MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / arrayRaw

Method arrayRaw

src/shared/utils/ObjectParser.ts:157–167  ·  view source on GitHub ↗
(func: ObjectParserArrayRawFunc<P>)

Source from the content-addressed store, hash-verified

155 }
156
157 arrayRaw(func: ObjectParserArrayRawFunc<P>): this {
158 const prop = this._property;
159 if (Array.isArray(prop)) {
160 for (let i = 0; i < prop.length; i++) {
161 func(prop[i], i, prop);
162 }
163 } else {
164 this._context.onError(new ObjectParserError(this._stack, 'Property is not an array.'));
165 }
166 return this;
167 }
168
169 prop<L extends keyof P>(label: L, funcOrOptional?: ((prop: P[L]) => void) | boolean, optional?: boolean): IObjectParserProp<P[L]> {
170 // Figure out which argument is used for what purpose

Callers

nothing calls this directly

Calls 1

onErrorMethod · 0.45

Tested by

no test coverage detected