param flags param flag returns const _isFlagSet = ( flags , flag ) => { return ( flags & flag ) === flag ; } ; export class FlaggedError { /**
     * Flags that may be set on an error instance.
     */ static FLAGS = { /**
         * A transient error results from an operation that could succeed if retried.
         */ TRANSIENT : 1 , /**
         * A quiet error should not trigger an error log.
         */ QUIET : 2 } ; protected flags : number = 0 ; returns isQuiet ( ) { return _isFlagSet ( this . flags , FlaggedError . FLAGS . QUIET ) ; } returns isTransient ( ) { return _isFlagSet ( this . flags , FlaggedError . FLAGS . TRANSIENT ) ; } }