Skip to content

Commit

Permalink
[Core] Update @blizzard-ap/core with better types and remove some unu…
Browse files Browse the repository at this point in the history
…sed ones
  • Loading branch information
Pewtro committed Mar 28, 2024
1 parent 8188522 commit 06dc41d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-suns-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/core': patch
---

Update @blizzard-ap/core with better types and remove some unused ones
9 changes: 1 addition & 8 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@ export type { BlizzardNamespaces } from './namespace.js';
export type { ClientOptions } from './request.js';

//Resource
export type {
Resource,
ResourceResponse,
ResourceOptions,
ResourceInterface,
ProtectedResourceOptions,
ProtectedResourceInterface,
} from './resource.js';
export type { Resource, ResourceResponse, ResourceOptions, ProtectedResourceOptions } from './resource.js';
8 changes: 2 additions & 6 deletions packages/core/src/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ export interface Resource<T = never> {
}
export type ResourceResponse<T = unknown> = Promise<T>;

export type ResourceOptions<T> = Partial<ClientOptions> & T;
export type ResourceInterface<T = unknown, P = unknown> = (options: ResourceOptions<T>) => Resource<P>;
export type ResourceOptions<T = unknown> = Partial<ClientOptions> & T;

export type ProtectedResourceOptions<T> = Partial<ClientOptions> & { token: string } & T;
export type ProtectedResourceInterface<T = unknown, P = unknown> = (
options: ProtectedResourceOptions<T>,
) => Resource<P>;
export type ProtectedResourceOptions<T = unknown> = Partial<ClientOptions> & { token: string } & T;

0 comments on commit 06dc41d

Please sign in to comment.