2024-07-23 13:57:22 +03:00
|
|
|
# Daletl specification for Dalet v1.0-preview
|
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
## Daletl
|
|
|
|
|
|
|
|
Daletl is data representation for Dalet interfaces. [DaletPack](./daletpack.md) serializes/deserializes into Daletl.
|
2024-07-23 13:57:22 +03:00
|
|
|
|
2024-07-27 17:44:34 +03:00
|
|
|
Daletl must be serialized as [DaletPack](./daletpack.md). All data transfer between server and client is done in this format.
|
2024-07-23 13:57:22 +03:00
|
|
|
|
|
|
|
### Root
|
|
|
|
|
2024-07-28 20:21:22 +03:00
|
|
|
Daletl root is array of tags. 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
|
|
|
|
type Root = 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
|
|
|
|
interface Tag {
|
|
|
|
id: number;
|
|
|
|
body: Tag[] | null;
|
|
|
|
argument: string | number | null;
|
|
|
|
}
|
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
|
|
|
|
const root: Root = [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
body: "I am Heading with level 1",
|
|
|
|
argument: 1,
|
|
|
|
},
|
|
|
|
];
|
2024-07-24 16:41:50 +03:00
|
|
|
```
|