| 2 | import { PluginInterface, NavigationItemInterface } from '../lib/interface'; |
| 3 | |
| 4 | export default class NavigationDirectives extends Plugin implements PluginInterface { |
| 5 | |
| 6 | getTypes(buildForType: string): NavigationItemInterface[] { |
| 7 | return this.document.directives |
| 8 | .map(directive => new NavigationItem( |
| 9 | directive.name, |
| 10 | this.url(directive), |
| 11 | directive.name === buildForType |
| 12 | )); |
| 13 | } |
| 14 | |
| 15 | getNavigations(buildForType: string) { |
| 16 | |
| 17 | const types: NavigationItemInterface[] = this.getTypes(buildForType); |
| 18 | |
| 19 | if (types.length === 0) |
| 20 | return []; |
| 21 | |
| 22 | return [ |
| 23 | new NavigationSection('Directives', types) |
| 24 | ]; |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected