Skip to content

Commit

Permalink
fix: correctly set types for dynamic request functions (#17)
Browse files Browse the repository at this point in the history
* fix: correctly set type for dynamic request function

* chore(release): bump package version to 1.2.1
  • Loading branch information
fabio-nettis committed Apr 16, 2024
1 parent bb9513f commit 68e2a32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {
import type {
War,
Stat,
Biome,
Order,
Effect,
Attack,
Planet,
Sector,
Expand Down Expand Up @@ -156,7 +158,7 @@ class SDK {
*
* Endpoint: `/api/biomes(/:id)`
*/
biomes = generateDynamicRequestFn<Assignment>("biomes");
biomes = generateDynamicRequestFn<Biome>("biomes");

/**
* ### Environmental Effects
Expand All @@ -166,7 +168,7 @@ class SDK {
*
* Endpoint: `/api/effects(/:id)`
*/
effects = generateDynamicRequestFn<Assignment>("effects");
effects = generateDynamicRequestFn<Effect>("effects");
}

const HellHub = SDK.getInstance();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "MIT",
"private": false,
"description": "The official SDK for HellHub API. Filter and collect data with full type safety out of the box.",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"keywords": [
Expand Down

0 comments on commit 68e2a32

Please sign in to comment.