const prefix = 'Invariant failed' ; export class Invariant extends Error { name = 'Invariant' ; } param condition param message export function invariant ( condition , message ? ) { if ( condition ) return ; if ( __DEV__ ) { throw new Invariant ( `${ prefix }: ${ message || '' }` ) ; } else { throw new Invariant ( prefix ) ; } }