@empathyco/x-components
Version:
Empathy X Components
20 lines (11 loc) • 586 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XInjectKey](./x-components.xinjectkey.md)
## XInjectKey interface
Type of the key passed to `provide` and `inject` to be type-safe. With this type you can declare the type of the injected value directly in the injection key.
**Signature:**
```typescript
export interface XInjectKey<Type> extends String
```
**Extends:** String
## Example
`const myKey: XInjectKey<Filter> = 'myFilter';` `inject(myKey)`