2024-07-23 13:57:22 +03:00
|
|
|
# Daletl specification for Dalet v1.0-preview
|
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
## Daletl
|
|
|
|
|
2024-08-07 15:54:57 +03:00
|
|
|
Daletl is data representation of deserialized [DaletPack](./daletpack.md).
|
2024-07-23 13:57:22 +03:00
|
|
|
|
2024-08-03 12:56:51 +03:00
|
|
|
### Page
|
2024-07-23 13:57:22 +03:00
|
|
|
|
2024-08-05 19:17:40 +03:00
|
|
|
Daletl page is struct. For convenience, we will use the typescript notation.
|
2024-07-23 13:57:22 +03:00
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
```typescript
|
2024-08-05 19:17:40 +03:00
|
|
|
interface Page = {
|
|
|
|
data: Tag[]
|
|
|
|
}
|
2024-07-23 13:57:22 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Tag
|
|
|
|
|
|
|
|
All tags specification is in [Tags](./tags.md).
|
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
```typescript
|
2024-08-03 12:56:51 +03:00
|
|
|
export type Body = string | Tag[] | null;
|
|
|
|
export type Argument = string | number | null;
|
|
|
|
|
|
|
|
export interface Tag {
|
2024-07-28 20:21:22 +03:00
|
|
|
id: number;
|
2024-08-03 12:56:51 +03:00
|
|
|
body: Body;
|
|
|
|
argument: Argument;
|
2024-07-28 20:21:22 +03:00
|
|
|
}
|
2024-07-24 16:41:50 +03:00
|
|
|
```
|
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
### Example
|
2024-07-24 16:41:50 +03:00
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
```typescript
|
2024-08-03 12:56:51 +03:00
|
|
|
const page: Page = [
|
2024-07-28 20:21:22 +03:00
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
body: "I am Heading with level 1",
|
|
|
|
argument: 1,
|
|
|
|
},
|
|
|
|
];
|
2024-07-24 16:41:50 +03:00
|
|
|
```
|