Skip to content

Commit

Permalink
FEAT: add types for main function (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustovicente authored Apr 30, 2024
1 parent 84a3652 commit d5fd36a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import { stack } from "./src/controllers/stack.controller";
import { user } from "./src/controllers/user.controller";
import { setToken } from "./src/services/api";

const lib = {
export interface Issuu {
draft: typeof draft;
publication: typeof publication;
stack: typeof stack;
user: typeof user;
}

const lib: Issuu = {
draft,
publication,
stack,
Expand All @@ -15,7 +22,7 @@ const lib = {
* Initialize the Issuu API client.
* @param token
*/
const Issuu = (token: string) => {
const Issuu = (token: string): Issuu => {
setToken(token);
return lib;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@issuu/issuu-api-sdk",
"version": "0.0.4",
"version": "0.0.5",
"type": "module",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit d5fd36a

Please sign in to comment.