static unwrapTrustedScript(safeScript) {
    // Perform additional Run-time type-checking to ensure that
    // safeScript is indeed an instance of the expected type.  This
    // provides some additional protection against security bugs due to
    // application code that disables type checks.
    // Specifically, the following checks are performed:
    // 1. The object is an instance of the expected type.
    // 2. The object is not an instance of a subclass.
    if (safeScript instanceof SafeScript &&
        safeScript.constructor === SafeScript) {
      return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;
    } else {
      fail(
          'expected object of type SafeScript, got \'' + safeScript +
          '\' of type ' + goog.typeOf(safeScript));
      return 'type_error:SafeScript';
    }
  }
Unwraps value as TrustedScript if supported or as a string if not.
@param {!SafeScript} safeScript
@return {!TrustedScript|string}
@see SafeScript.unwrap
@deprecated Use `safevalues.unwrapScript` instead.