<!-- source-hash: eb9e1e114c43007debee28971d977a02 -->
A utility module for managing announcement data persistence in browser localStorage with safe server-side rendering support.

## Key Components

- **`AnnouncementStorageOptions`** - Interface defining storage configuration with key and optional default value
- **`getStoredAnnouncement(key)`** - Retrieves and parses announcement data from localStorage
- **`setStoredAnnouncement(key, value)`** - Stores announcement data as JSON in localStorage
- **`clearStoredAnnouncement(key?)`** - Removes announcement data from localStorage (defaults to 'announcement' key)

## Usage Example

```typescript
import { 
  getStoredAnnouncement, 
  setStoredAnnouncement, 
  clearStoredAnnouncement 
} from './announcement-storage';

// Store announcement dismissal state
setStoredAnnouncement('banner-dismissed', { 
  dismissed: true, 
  timestamp: Date.now() 
});

// Check if announcement was dismissed
const dismissalState = getStoredAnnouncement('banner-dismissed');
if (dismissalState?.dismissed) {
  console.log('Banner was dismissed');
}

// Clear announcement data
clearStoredAnnouncement('banner-dismissed');
```

All functions include browser environment checks and error handling to prevent issues during server-side rendering or when localStorage is unavailable.