( shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9 )
| 656 | * @closurePrimitive {asserts.truthy} |
| 657 | */ |
| 658 | export function devAssert( |
| 659 | shouldBeTrueish, |
| 660 | opt_message, |
| 661 | opt_1, |
| 662 | opt_2, |
| 663 | opt_3, |
| 664 | opt_4, |
| 665 | opt_5, |
| 666 | opt_6, |
| 667 | opt_7, |
| 668 | opt_8, |
| 669 | opt_9 |
| 670 | ) { |
| 671 | if (mode.isMinified()) { |
| 672 | return shouldBeTrueish; |
| 673 | } |
| 674 | if (self.__AMP_ASSERTION_CHECK) { |
| 675 | // This will never execute regardless, but will be included on unminified |
| 676 | // builds. It will be DCE'd away from minified builds, and so can be used to |
| 677 | // validate that Babel is properly removing dev assertions in minified |
| 678 | // builds. |
| 679 | console /*OK*/ |
| 680 | .log('__devAssert_sentinel__'); |
| 681 | } |
| 682 | |
| 683 | return dev()./*Orig call*/ assert( |
| 684 | shouldBeTrueish, |
| 685 | opt_message, |
| 686 | opt_1, |
| 687 | opt_2, |
| 688 | opt_3, |
| 689 | opt_4, |
| 690 | opt_5, |
| 691 | opt_6, |
| 692 | opt_7, |
| 693 | opt_8, |
| 694 | opt_9 |
| 695 | ); |
| 696 | } |
| 697 | |
| 698 | /** |
| 699 | * Throws an error if the first argument isn't trueish. |
no test coverage detected