Skip to content

Commit 061367b

Browse files
authored
fix: change FetchListDataSourceError to a class declaration (#2614)
* refactor: change FetchListDataSourceError to a class declaration * fix: update export method for FetchListDataSourceError in the package
1 parent e5fa66b commit 061367b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/huge-mangos-walk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sl-design-system/data-source': patch
3+
---
4+
5+
Changed the way FetchListDataSourceError is exported in the package.

packages/components/data-source/src/fetch-list-data-source.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ export interface FetchListDataSourceOptions<T> extends ListDataSourceOptions<T>
6868

6969
export type FetchListDataSourceEvent = CustomEvent<FetchListDataSourceCallbackOptions>;
7070

71-
export const FetchListDataSourceError = class extends Error {
71+
export class FetchListDataSourceError extends Error {
7272
constructor(
7373
message: string,
7474
public response: Response
7575
) {
7676
super(message);
7777
}
78-
};
78+
}
7979

8080
/** Symbol used as a placeholder for items that are being loaded. */
8181
export const FetchListDataSourcePlaceholder = Symbol('FetchListDataSourcePlaceholder');

0 commit comments

Comments
 (0)