feat: add patch to add generic types to eventemitter2

EventEmitter2 has types, but they're very basic and not very type safe.
I created this patch, because my improved types haven't been merged into the official package.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-02-06 13:21:58 +01:00
parent 11c2f57e4b
commit caa53e3556
16 changed files with 445 additions and 22 deletions

View file

@ -5,7 +5,7 @@
*/
import type { NodeProcessor } from '../../node-preprocessors/node-processor'
import type { ComponentReplacer } from '../../replace-components/component-replacer'
import type EventEmitter2 from 'eventemitter2'
import type { EventEmitter2 } from 'eventemitter2'
import type MarkdownIt from 'markdown-it'
/**

View file

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import EventEmitter2 from 'eventemitter2'
import { EventEmitter2 } from 'eventemitter2'
import type { PropsWithChildren } from 'react'
import React, { createContext, useContext, useEffect, useMemo } from 'react'