ChemPal Documentation - v1.6.0
    Preparing search index...
    • Type guard for TimestampStorage objects stored in local state.

      Parameters

      • data: unknown

        The value to check

      Returns data is TimestampStorage

      Whether the value is a valid TimestampStorage

      export function isTimestampStorage(data: unknown): data is TimestampStorage {
      return (
      typeof data === 'object' &&
      data !== null &&
      'serverTm' in data &&
      typeof data.serverTm === 'number' &&
      'clientTm' in data &&
      typeof data.clientTm === 'number'
      );
      }