(stage: TRANSFORM_STAGE = TRANSFORM_STAGE.SAVE)
| 108 | } |
| 109 | |
| 110 | export(stage: TRANSFORM_STAGE = TRANSFORM_STAGE.SAVE) { |
| 111 | if (this.items.length < 1) { |
| 112 | return {} |
| 113 | } |
| 114 | |
| 115 | const props: PropsMap = {} |
| 116 | const extras: PropsMap = {} |
| 117 | |
| 118 | this.items.forEach(item => { |
| 119 | const key = item.key as string |
| 120 | if (key == null || item.isUnset()) return |
| 121 | const value = item.export(stage) |
| 122 | if (value != null) { |
| 123 | if (typeof key === 'string' && isExtraKey(key)) { |
| 124 | extras[getOriginalExtraKey(key)] = value |
| 125 | } else { |
| 126 | props[key] = value |
| 127 | } |
| 128 | } |
| 129 | }) |
| 130 | |
| 131 | return { props, extras } |
| 132 | } |
| 133 | |
| 134 | merge(value: PropsMap, extras?: PropsMap) { |
| 135 | Object.keys(value).forEach(key => { |
nothing calls this directly
no test coverage detected