You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Juno provides a type system built on top of [Zod](https://zod.dev/), extended with a few additional types you'll need when working with serverless functions.
4
+
5
+
All types are available through `j`.
6
+
7
+
```typescript
8
+
import { j } from"@junobuild/schema";
9
+
```
10
+
11
+
---
12
+
13
+
## Juno Types
14
+
15
+
The following are specific types provided by Juno:
16
+
17
+
### j.principal()
18
+
19
+
Validates and represents an Internet Computer Principal.
20
+
21
+
```typescript
22
+
j.principal();
23
+
```
24
+
25
+
### j.uint8array()
26
+
27
+
Validates and represents a `Uint8Array`.
28
+
29
+
```typescript
30
+
j.uint8array();
31
+
```
32
+
33
+
---
34
+
35
+
## Zod Types
36
+
37
+
All Zod types are available through `j`. Refer to the [Zod documentation](https://zod.dev/) for the full API reference.
38
+
39
+
:::note
40
+
41
+
`union` is not supported. Use `discriminatedUnion` instead.
0 commit comments