Skip to content

Commit

Permalink
Add eslint ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
pvditto committed Apr 18, 2024
1 parent 64b6d3c commit a95ea10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DittoProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const DittoProvider: React.FunctionComponent<DittoProviderProps> = (
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})`,
)
}
Expand All @@ -82,6 +84,8 @@ export const DittoProvider: React.FunctionComponent<DittoProviderProps> = (
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}`,
)
}
Expand Down

0 comments on commit a95ea10

Please sign in to comment.