From a95ea1024362bfa62cd0c7b39f61b507fee0923f Mon Sep 17 00:00:00 2001 From: Vincent Ahrend Date: Thu, 18 Apr 2024 15:48:17 +0200 Subject: [PATCH] Add eslint ignore --- src/DittoProvider.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DittoProvider.tsx b/src/DittoProvider.tsx index 94064da..ede00c9 100644 --- a/src/DittoProvider.tsx +++ b/src/DittoProvider.tsx @@ -72,6 +72,8 @@ export const DittoProvider: React.FunctionComponent = ( for (const ditto of dittos) { if (!(ditto instanceof Ditto)) { throw new Error( + // Type is `never` because correct use never reaches this point + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `expected an array of Ditto instances to be returned by the setup function, but at least one element is not a Ditto instance (got ${ditto})`, ) } @@ -82,6 +84,8 @@ export const DittoProvider: React.FunctionComponent = ( const ditto = setupReturnValue if (!(ditto instanceof Ditto)) { throw new Error( + // Type is `never` because correct use never reaches this point + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `expected a Ditto instance to be returned by the setup function, but got ${ditto}`, ) }