I am using tern in a project where we would like to provide custom list of completions to the user in some specific situations but use the existing code completions provided by the library otherwise. My idea is to provide a hook similar to defineQueryType, using which people can register a custom implementation for any of the existing query type. The custom implementation receives the default implementation for that query type as a parameter and hence call the default implementation as well.
I am ready to contribute towards this and can make a pull request, but just wanted to confirm if something like would be acceptable. Also i am open to any other suggestions to achieving this that doesn't require any change in the library. Thanks in advance.