First of all, thank you for investing your time in contributing to this project. This guide includes everything you need to know to contribute.
Before you contribute, make sure you understand the goals of this project. If you're unsure if your contribution would fit these goals, please just open an issue and ask.
-
Basically no bundle size
Including this package in your project, should result in basically no added bundle size. The majority are just type shims anyway. -
Full compatibility with
EventTarget
Migrating fromEventTarget
should simply require swappingEventTarget
withTypedEventTarget
-
Work with all types of
Event
This package should not take any assumptions of what type of event a user wants to use. It should work withEvent
and any classes that extendEvent
(no matter if user-defined or included in ECMAScript)
You should use Prettier to format your code.
You can run Prettier by executing npm run fmt
For linting we use ESLint. Please make sure any code that you contribute complies with our ESLint config.
You can run ESLint by executing npm run lint
This project includes some tests via tsd
. These tests are mainly to ensure that future commits do not break any TS types.
You can run the tests by executing npm run test
This project uses tsup
as its build system.
You can build the project by executing npm run build