How to use the @nakedobjects/restful-objects.withNull function in @nakedobjects/restful-objects

To help you get started, we’ve selected a few @nakedobjects/restful-objects examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / view-models / src / property-view-model.ts View on Github external
private getDigest(propertyRep: Ro.PropertyMember): string | null {
        const parent = propertyRep.parent;
        if (parent instanceof Ro.DomainObjectRepresentation) {
            if (parent.isTransient()) {
                return Ro.withNull(parent.etagDigest);
            }
        }
        return null;
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / services / src / context.service.ts View on Github external
function isSameObject(object: Ro.DomainObjectRepresentation | null | undefined, type: string, id?: string) {
    if (object) {
        const sid = object.serviceId();
        return sid ? sid === type : (object.domainType() === type && object.instanceId() === Ro.withNull(id));
    }
    return false;
}