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}`, ) }