generator: support callback property type in javascript