flesh out the example with more types

This commit is contained in:
Brian Hicks 2024-04-23 17:38:23 -05:00
parent fe2e2b18ec
commit 499039fef4
No known key found for this signature in database
GPG Key ID: C4F324B9CAAB0D50
3 changed files with 71 additions and 2 deletions

View File

@ -116,7 +116,48 @@
},
"definitions": {
"doc": {
"properties": {}
"properties": {
"version": {
"type": "int32"
},
"pings": {
"elements": {
"ref": "ping"
}
},
"settings": {
"ref": "settings"
}
}
},
"settings": {
"properties": {
"version": {
"type": "int32"
},
"minutesPerPing": {
"type": "int32"
}
}
},
"ping": {
"properties": {
"version": {
"type": "int32"
},
"time": {
"type": "int32"
},
"tag": {
"type": "string",
"nullable": true
},
"custom": {
"values": {
"type": "string"
}
}
}
}
}
}

View File

@ -25,6 +25,17 @@ declare module Elm {
};
docFromAutomerge: {
send: (value: {
pings: ({
custom: Record<string, string>;
tag: string | null;
time: number;
version: number;
})[];
settings: {
minutesPerPing: number;
version: number;
};
version: number;
}) => void;
};
notificationPermission: {

View File

@ -27,8 +27,25 @@ type ChangeDocument
type alias PingsElements =
{ custom : Dict String String
, tag : Maybe String
, time : Int
, version : Int
}
type alias Settings =
{ minutesPerPing : Int
, version : Int
}
type alias DocFromAutomerge =
{}
{ pings : List PingsElements
, settings : Settings
, version : Int
}
type NotificationPermission