import { Argument , Attribute } from '../arguments' ; import { Block } from '.' ; category export class Provider extends Block { readonly type : string ; param type param args constructor ( type , args ? ) { super ( 'provider' , [ type ] , args ) ; this . type = type ; } override asArgument ( ) { if ( this . getArgument ( 'alias' ) ) { return new Argument ( `${ this . type }.${ this . getArgument ( 'alias' ) }` ) ; } throw new Error ( 'Provider has no alias.' ) ; } override attr ( _name ) { throw new Error ( 'Inaccessible method.' ) ; } }