dalet/specification/daletl.md

40 lines
734 B
Markdown
Raw Normal View History

# Daletl specification for Dalet v1.0-preview
## Daletl
Daletl is data representation for Dalet interfaces. [DaletPack](./daletpack.md) serializes/deserializes into Daletl.
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.
### Root
Daletl root is array of tags. For convenience, we will use the typescript notation.
```typescript
type Root = Tag[];
```
### Tag
All tags specification is in [Tags](./tags.md).
```typescript
interface Tag {
id: number;
body: Tag[] | null;
argument: string | number | null;
}
2024-07-24 16:41:50 +03:00
```
### Example
2024-07-24 16:41:50 +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
```