mirror of
https://github.com/BrianHicks/elm-duet.git
synced 2024-10-04 00:47:23 +03:00
flesh out the example with more types
This commit is contained in:
parent
fe2e2b18ec
commit
499039fef4
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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: {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user