devAssert.js.flow 291 B

12345678
  1. // @flow strict
  2. export default function devAssert(condition: mixed, message: string): void {
  3. const booleanCondition = Boolean(condition);
  4. // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
  5. if (!booleanCondition) {
  6. throw new Error(message);
  7. }
  8. }