From 5116df46a020ae498eec6783cfe9147fc9add015 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Wed, 15 Jul 2020 15:31:43 +0100 Subject: Add generic types and update tests (#107) * Add generic types and update tests * Add generic types to `on`, `off` and `emit` to enable some nicer TS usage if you specify what type you're expecting from the `EventData`. * Move the tests to be TypeScript source. This will help catch errors in the tests if there are any type errors. * Create a new test to test the generic types and make sure they pass and error when expected. * Upgrade to Mocha 8. * Did some tidying up of the package.json scripts. * Tweak TS setup to validate tests * Fix d.ts generation and tests Co-authored-by: Jason Miller --- .editorconfig | 1 + 1 file changed, 1 insertion(+) (limited to '.editorconfig') diff --git a/.editorconfig b/.editorconfig index ac0adb7..04d7ef9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,7 @@ insert_final_newline = true [{package.json,.*rc,*.yml}] indent_style = space indent_size = 2 +insert_final_newline = false [*.md] trim_trailing_whitespace = false -- cgit v1.2.3