From 0314335b0782d015840dad61ea11d48c1ccac654 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Sat, 27 Jan 2024 07:42:11 +1100 Subject: [PATCH] fixup: revert options type to match dom-testing-library --- .eslintrc.cjs | 4 ++++ types/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d1caef7..0bd04ba 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -25,6 +25,10 @@ module.exports = { 'prettier', ], rules: { + '@typescript-eslint/ban-types': [ + 'error', + { types: { '{}': false }, extendDefaults: true }, + ], '@typescript-eslint/no-explicit-any': 'off', 'import/export': 'off', }, diff --git a/types/index.d.ts b/types/index.d.ts index 905ce04..26d85d7 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -53,7 +53,7 @@ export function cleanup(): void export type FireFunction = (element: Document | Element | Window, event: Event) => Promise; export type FireObject = { - [K in EventType]: (element: Document | Element | Window, options?: Record) => Promise; + [K in EventType]: (element: Document | Element | Window, options?: {}) => Promise; }; export const fireEvent: FireFunction & FireObject;