It needs to set `resolve` and `reject` on the `$ctx` object so this has to happen after the object literal itself.