not

static not<T, U>(
    condition: (target: T) => Condition<U>
): (target: T) => Condition<U>;

Parameters

Returns

  • The opposite condition

Examples

Return only facts that do not have a specified successor.

Blog Chat.Message Chat.Message Chat.Channel Chat.Channel Chat.Message->Chat.Channel channel Chat.Message.Redacted Chat.Message.Redacted Chat.Message.Redacted->Chat.Message message
function messagesInChannel(c) {
    return j.match({
        type: 'Chat.Message',
        channel: c
    }).suchThat(j.not(messageIsRedacted));
}

function messageIsRedacted(m) {
    return j.exists({
        type: 'Chat.Message.Redacted',
        message: m
    });
}

Continue With

login