fix(parse/js): handle incomplete declarations more gracefully (#11422)