Skip to content

Commit

Permalink
Declare context
Browse files Browse the repository at this point in the history
  • Loading branch information
stil committed May 22, 2024
1 parent 0bf4e8e commit c0b29cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/eui/src/services/window_event/window_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Component } from 'react';
import { Component, ContextType } from 'react';
import { EuiWindowContext, EuiWindowContextValue } from '../window_provider';

type EventNames = keyof WindowEventMap;
Expand All @@ -18,6 +18,7 @@ interface Props<Ev extends EventNames> {

export class EuiWindowEvent<E extends EventNames> extends Component<Props<E>> {
static contextType = EuiWindowContext;
declare context: ContextType<typeof EuiWindowContext>;

componentDidMount() {
this.addEvent(this.props);
Expand Down

0 comments on commit c0b29cf

Please sign in to comment.