param name function UI5 ( name ) { return function ( target ) : FunctionConstructor { var functionMembers = Object . getOwnPropertyNames ( function ( ) { } ) ; var staticMembers = Object . getOwnPropertyNames ( target ) . filter ( o => functionMembers . indexOf ( o ) === - 1 ) ; var instanceMethods = Object . getOwnPropertyNames ( target . prototype ) ; var baseClass = Object . getPrototypeOf ( target ) ; var thisClass = { } ; staticMembers . forEach ( m => thisClass [ m ] = ( < any > target ) [ m ] ) ; instanceMethods . forEach ( m => thisClass [ m ] = ( < any > target . prototype ) [ m ] ) ; if ( typeof baseClass . extend === "function" ) { return baseClass . extend ( name , thisClass ) ; } else { throw new Error ( "This class doesn't inherit from a UI5 class" ) ; } } ; }