with parameter breaks the types for the output.findWorkById method with the scope being extended I would expect the type of the returned value to be:scope value the return type is always the 'base' type for the work schema which is:{ workDescription: true, workContact: true } directly to the with parameter, without the ternary, the the returned object has the correct type.