import { CommandInterface } from '../Commands' ; import { Variables } from './Variables' ; import { Variable } from './Variable' ; export class Function extends Variable { private static BASE_TYPE : string = 'function' ; private _typename : string = Function . BASE_TYPE ; constructor ( name = '' , value = '' , type = Function . BASE_TYPE ) { super ( ) ; this . _name = name ; this . _value = value ; this . _typename = type ; } public typename ( ) { return this . _typename ; } public loads ( type ) { return type . includes ( this . typename ( ) ) ; } public extendedTypename ( ) { return this . typename ( ) ; } public createConcreteType ( name , value , type ) { return new Function ( name , value , type ) ; } public loadNew ( name , type , runtime , callback ) { Variables . getValue ( name , runtime , ( value ) => { callback ( this . createConcreteType ( name , value , type ) ) ; } ) ; } public listChildren ( runtime , count , start , callback ) { } }