require the inherits library from npm (which PouchDB already does so no increase in size), then this becomes
inherits(QueryParseError, Error)'