# Function isTimeoutError

- isTimeoutError(error: unknown): error is TimeoutError

  Type guard to check if an error is a TimeoutError

  #### Parameters

  - error: unknown

    Error to check

  #### Returns error is TimeoutError

  true if error is a TimeoutError

  #### Example

      try {
        await withTimeout(operation(), 5000);
      } catch (error) {
        if (isTimeoutError(error)) {
          console.error('Operation timed out:', error.timeoutMs);
        }
      }

  #### Since

  0.8.0

  - Defined in utils/timeout.ts:337