( varName: string, inName: string, section: FormKitSchemaExtendableSection )
| 354 | */ |
| 355 | /*@__NO_SIDE_EFFECTS__*/ |
| 356 | export function $for( |
| 357 | varName: string, |
| 358 | inName: string, |
| 359 | section: FormKitSchemaExtendableSection |
| 360 | ) { |
| 361 | return (extensions: FormKitSectionsSchema): FormKitSchemaNode => { |
| 362 | const node = section(extensions) |
| 363 | if (isSlotCondition(node)) { |
| 364 | Object.assign(node.else, { for: [varName, inName] }) |
| 365 | } else if (isSchemaObject(node)) { |
| 366 | Object.assign(node, { for: [varName, inName] }) |
| 367 | } |
| 368 | return node |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Extends a schema node with a given set of extensions. |
no test coverage detected