function trustAs(type, trustedValue) {
      var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
      if (!Constructor) {
        throw $sceMinErr('icontext',
            'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',
            type, trustedValue);
      }
      if (trustedValue === null || trustedValue === undefined || trustedValue === '') {
        return trustedValue;
      }
      // All the current contexts in SCE_CONTEXTS happen to be strings.  In order to avoid trusting
      // mutable objects, we ensure here that the value passed in is actually a string.
      if (typeof trustedValue !== 'string') {
        throw $sceMinErr('itype',
            'Attempted to trust a non-string value in a content requiring a string: Context: {0}',
            type);
      }
      return new Constructor(trustedValue);
    }
@ngdoc method
@name ng.$sceDelegate#trustAs
@methodOf ng.$sceDelegate

@description
Returns an object that is trusted by angular for use in specified strict
contextual escaping contexts (such as ng-bind-html, ng-include, any src
attribute interpolation, any dom event binding attribute interpolation
such as for onclick,  etc.) that uses the provided value.
See {@link ng.$sce $sce} for enabling strict contextual escaping.

@param {string} type The kind of context in which this value is safe for use.  e.g. url,
  resourceUrl, html, js and css.
@param {*} value The value that that should be considered trusted/safe.
@returns {*} A value that can be used to stand in for the provided `value` in places
where Angular expects a $sce.trustAs() return value.