Skip to content

Commit

Permalink
Merge pull request #22 from GW2Treasures/fix/typo
Browse files Browse the repository at this point in the history
Fix typo in type `KnownAuthenticatedEndpoint`
  • Loading branch information
darthmaim authored Apr 11, 2024
2 parents bcf18b2 + 7aa6297 commit 70a1d5d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-grapes-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gw2api/types": patch
---

Fix typo in type `KnownAuthenticatedEndpoint`
6 changes: 3 additions & 3 deletions packages/types/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Quaggan } from './data/quaggan';
import { Tokeninfo } from './data/tokeninfo';
import { SchemaVersion } from './schema';

export type KnwownAuthenticatedEndpoint =
export type KnownAuthenticatedEndpoint =
| '/v2/account'
| '/v2/account/achievements'
| '/v2/account/bank'
Expand Down Expand Up @@ -280,7 +280,7 @@ export type KnownLocalizedEndpoint =
| '/v2/wvw/rewardtracks'
| '/v2/wvw/upgrades'

export type KnownEndpoint = KnwownAuthenticatedEndpoint | KnownUnauthorizedEndpoint | KnownBulkExpandedEndpoint | KnownLocalizedEndpoint;
export type KnownEndpoint = KnownAuthenticatedEndpoint | KnownUnauthorizedEndpoint | KnownBulkExpandedEndpoint | KnownLocalizedEndpoint;

// helper types for parameters
type CombineParameters<P1 extends string, P2 extends string> = `${P1}&${P2}` | `${P2}&${P1}`;
Expand Down Expand Up @@ -330,7 +330,7 @@ export type OptionsByEndpoint<Endpoint extends string> =
Endpoint extends BulkExpandedManyEndpointUrl<KnownBulkExpandedEndpoint & KnownLocalizedEndpoint> ? Options & LocalizedOptions :
Endpoint extends BulkExpandedSingleEndpointUrl<KnownBulkExpandedEndpoint & KnownLocalizedEndpoint, string> ? Options & LocalizedOptions :
Endpoint extends KnownLocalizedEndpoint ? Options & LocalizedOptions :
Endpoint extends KnwownAuthenticatedEndpoint ? Options & AuthenticatedOptions :
Endpoint extends KnownAuthenticatedEndpoint ? Options & AuthenticatedOptions :
Endpoint extends CreateSubtokenUrl<'/v2/createsubtoken'> ? Options & AuthenticatedOptions :
Options

Expand Down

0 comments on commit 70a1d5d

Please sign in to comment.