Skip to content

Commit 04c7df8

Browse files
committed
fix typescript types
1 parent 0f6cda3 commit 04c7df8

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

core/static/bundled/utils/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const paginated = async <T>(
5656

5757
interface Request extends TDataShape {
5858
client?: Client;
59-
url: string;
6059
}
6160

6261
interface InterceptorOptions {

counter/static/bundled/counter/product-list-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ document.addEventListener("alpine:init", () => {
108108
* Build the object containing the query parameters corresponding
109109
* to the current filters
110110
*/
111-
getQueryParams(): ProductSearchProductsDetailedData {
111+
getQueryParams(): Omit<ProductSearchProductsDetailedData, "url"> {
112112
const search = this.search.length > 0 ? this.search : null;
113113
// If active or archived products must be filtered, put the filter in the request
114114
// Else, don't include the filter

sas/static/bundled/sas/album-index.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ document.addEventListener("alpine:init", () => {
2424
page: Number.parseInt(initialUrlParams.get("page")) || 1,
2525
pushstate: History.Push /* Used to avoid pushing a state on a back action */,
2626
loading: false,
27-
config: config,
2827

2928
async init() {
3029
await this.fetchPictures();
@@ -51,11 +50,9 @@ document.addEventListener("alpine:init", () => {
5150
async fetchPictures() {
5251
this.loading = true;
5352
this.pictures = await paginated(picturesFetchPictures, {
54-
query: {
55-
// biome-ignore lint/style/useNamingConvention: API is in snake_case
56-
album_id: config.albumId,
57-
} as PicturesFetchPicturesData["query"],
58-
});
53+
// biome-ignore lint/style/useNamingConvention: API is in snake_case
54+
query: { album_id: config.albumId },
55+
} as PicturesFetchPicturesData);
5956
this.loading = false;
6057
},
6158

@@ -66,7 +63,6 @@ document.addEventListener("alpine:init", () => {
6663

6764
Alpine.data("albums", (config: SubAlbumsConfig) => ({
6865
albums: [] as AlbumSchema[],
69-
config: config,
7066
loading: false,
7167

7268
async init() {
@@ -77,7 +73,7 @@ document.addEventListener("alpine:init", () => {
7773
this.loading = true;
7874
this.albums = await paginated(albumFetchAlbum, {
7975
// biome-ignore lint/style/useNamingConvention: API is snake_case
80-
query: { parent_id: this.config.parentId },
76+
query: { parent_id: config.parentId },
8177
} as AlbumFetchAlbumData);
8278
this.loading = false;
8379
},

sas/static/bundled/sas/user/pictures-index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ document.addEventListener("alpine:init", () => {
1717

1818
async init() {
1919
this.pictures = await paginated(picturesFetchPictures, {
20-
query: {
21-
// biome-ignore lint/style/useNamingConvention: from python api
22-
users_identified: [config.userId],
23-
} as PicturesFetchPicturesData["query"],
24-
});
20+
// biome-ignore lint/style/useNamingConvention: from python api
21+
query: { users_identified: [config.userId] },
22+
} as PicturesFetchPicturesData);
2523

2624
this.albums = this.pictures.reduce(
2725
(acc: Record<string, PictureSchema[]>, picture: PictureSchema) => {

0 commit comments

Comments
 (0)