open-index/open-npm huggingface dataset:
npm package: @ops-ai/toggly-hooks-types
Description: TypeScript types for Toggly SDK hooks
Author: Toggly
Latest version: 1.2.0

# @ops-ai/toggly-hooks-types

TypeScript types for Toggly SDK hooks. This package provides the core interfaces for implementing hooks in Toggly SDKs.

## Installation

```bash
npm install @ops-ai/toggly-hooks-types
```

## Usage

```typescript
import type { Hook, HookMetadata, EvaluationSeriesData } from '@ops-ai/toggly-hooks-types';

class MyCustomHook implements Hook {
  getMetadata(): HookMetadata {
    return { name: 'my-custom-hook' };
  }

  afterEvaluation(flagKey: string, data: EvaluationSeriesData | void, result: boolean): void {
    console.log(`Feature "${flagKey}" evaluated to ${result}`);
  }
}
```

## Hook Interface

```typescript
interface Hook {
  getMetadata(): HookMetadata;
  beforeEvaluation?(flagKey: string, defaultValue?: boolean): EvaluationSeriesData | void;
  afterEvaluation?(flagKey: string, data: EvaluationSeriesData | void, result: boolean): void;
  beforeIdentify?(identity: string): IdentitySeriesData | void;
  afterIdentify?(identity: string, data: IdentitySeriesData | void): void;
  afterRefresh?(flags: { [key: string]: boolean }): void;
}
```

## Hook Stages

- **beforeEvaluation**: Called before feature flag evaluation
- **afterEvaluation**: Called after feature flag evaluation with the result
- **beforeIdentify**: Called before setting or changing user identity
- **afterIdentify**: Called after identity has been set or changed
- **afterRefresh**: Called when flags are refreshed from the server

## License

MIT
npm package: @ops-dss/eslint-config
Description: Shared ESLint configuration for OPS-DSS projects
Author: OPS/PAHO
Latest version: 0.0.1

# eslint-config

Part of the DSS Health Indicators Monitoring System

This package is automatically synced from the main monorepo.

## Contributing

Please submit pull requests to this repository. Approved changes will be synced back to the main monorepo.