Closed hakimio closed 1 week ago
I've never used this cds.outboxed
, pls, give me a very simple use case so I know what's all about.
Basically it allows you to:
EDIT: Unfortunately, cds-types v0.2.0
which works with cds v7
does not define cds.outboxed()
function.
Let's leave it open. Somehow the new version of cds@8 and all related packages like cds-types are not in great shape in terms of typescript, they have removed a lot of types in the new version.
Ok, if anyone else wants to use outboxed()
with cds v7
and cds-types v0.2.0
, here is the type definition for outboxed()
:
declare module '@sap/cds' {
import {Service} from '@cap-js/cds-types';
export * from '@cap-js/cds-types';
export declare const outboxed: (service: Service) => Service;
}
Ok, just did a small feasability check, and this should not be that hard to implement. If you follow this feature in the new cds-types package, let me know once it's there and I will start impelemnting it.
The type is already in the new cds-types
package, starting with v0.3.0-beta.1
. The only problem is that cds-types v0.3.0+
is not compatible with cds v7
.
Ok, understood, once we have a stable cds-types
I will work on this new feature.
Help me do this
Description
Would be nice to be able to directly inject
outboxed
service. TS types forcds.outboxed()
were introduced incds-types v0.3.0-beta.1
.Suggested solution