fotexnet / fotexnet/react-auth

[BUG]: Some typings return any eventhough they are explicitly set

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

Basically the title is the description of the bug. I found that error using the `createUserProvider`

```tsx
const provider = createUserProvider({
dataKey: 'customer',
mode: 'fetch',
loginUrl: {
local: API_URL + '/api/v1/public/auth',
social: API_URL + '/api/v1/public/auth/social',
},
logoutUrl: API_URL + '/api/v1/public/auth/logout',
localOnly: false,
httpClient: http.client,
useProfile: () => {
const { data } = useProfile();
return data || null;
},
});

provider.meta // shows any, because provider is interpreted as any
```

**To Reproduce**
1. install package in a new project
2. create a user provider
3. extract `meta`
4. see `any` type

**Expected behavior**

I expect it to be typed as `{ interceptors: Interceptors }`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.