Skip to content

Commit cd391c4

Browse files
authored
Update readme.md
Update readme with details on how to extend type
1 parent d7d72f0 commit cd391c4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

readme.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,24 @@ pnpm install @kinde/jwt-decoder
1717

1818
## Usage
1919

20-
```js
20+
__import function__
21+
```ts
2122
import { jwtDecoder } from "@kinde/jwt-decoder";
23+
```
2224

25+
__Simple decode__
26+
```ts
2327
const decodedToken = jwtDecoder("eyJhbGc...");
2428
```
2529

30+
__Decode with extended type__
31+
32+
```ts
33+
const decodedToken = jwtDecoder<JWTDecoded & {
34+
// Extra attributes here
35+
}>("eyJhbGc...");
36+
```
37+
2638
## Kinde documentation
2739

2840
[Kinde Documentation](https://kinde.com/docs/) - Explore the Kinde docs

0 commit comments

Comments
 (0)