Aller au contenu principal

Not <Self, Output>

Module interface for the unary ! operator

Index

Methods

Methods

not

  • not(self: Self): Output
  • Performs the equivalent of the ! operation.

    @example
    type Answer = 'yes' | 'no';

    const Answer: Not<Answer> = {
    not(self) => self === 'yes' ? 'no' : 'yes',
    };

    Answer.not('yes') // 'no'
    Answer.not('no') // 'yes'
Page Options