(parser: IObjectParserProp<ContextButton>)
| 230 | } |
| 231 | |
| 232 | function parseContextButton(parser: IObjectParserProp<ContextButton>): ContextButton { |
| 233 | const contextButton: ContextButton = { |
| 234 | context: 'game', |
| 235 | name: '', |
| 236 | command: '' |
| 237 | }; |
| 238 | parser.prop('context', v => contextButton.context = parseButtonContext(v)); |
| 239 | parser.prop('name', v => contextButton.name = str(v)); |
| 240 | parser.prop('command', v => contextButton.command = str(v)); |
| 241 | parser.prop('runWithNoCuration', v => contextButton.runWithNoCuration = !!v, true); |
| 242 | return contextButton; |
| 243 | } |
| 244 | |
| 245 | function parseButtonContext(value: any): ButtonContext { |
| 246 | // TODO : Validate |
no test coverage detected