(...commandClasses)
| 269 | } |
| 270 | |
| 271 | addCommands(...commandClasses) { |
| 272 | for (const CommandClass of commandClasses) { |
| 273 | if (!CommandClass.keyword) { |
| 274 | throw new Error(`Command class ${CommandClass.name} must have a static 'keyword' property`); |
| 275 | } |
| 276 | if (!CommandClass.parse) { |
| 277 | throw new Error(`Command class ${CommandClass.name} must have a static 'parse' method`); |
| 278 | } |
| 279 | var keywords = Array.isArray(CommandClass.keyword) ? CommandClass.keyword : [CommandClass.keyword]; |
| 280 | for (var kw of keywords) this.addCommand(kw, CommandClass.parse); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | addFeatures(...featureClasses) { |
| 285 | for (const FeatureClass of featureClasses) { |
nothing calls this directly
no test coverage detected