There isn't any ought to utilize a return assertion as the compiler can infer that you want to return the result of the expression This is apparently similar to this situation: Phony "Property will not exist on style 'in no way'" when switching value inside callback with strictNullChecks, that is https://whitelandgurugram.co.in/