(name: string, component?: Component)
| 327 | }, |
| 328 | |
| 329 | component(name: string, component?: Component): any { |
| 330 | if (__DEV__) { |
| 331 | validateComponentName(name, context.config) |
| 332 | } |
| 333 | if (!component) { |
| 334 | return context.components[name] |
| 335 | } |
| 336 | if (__DEV__ && context.components[name]) { |
| 337 | warn(`Component "${name}" has already been registered in target app.`) |
| 338 | } |
| 339 | context.components[name] = component |
| 340 | return app |
| 341 | }, |
| 342 | |
| 343 | directive(name: string, directive?: Directive) { |
| 344 | if (__DEV__) { |
nothing calls this directly
no test coverage detected