Add struct for fire-dom-event action (#9556)

This commit is contained in:
Bram Kragten 2021-07-15 12:08:33 +02:00 committed by GitHub
parent e797c01761
commit cc81239b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import {
array,
literal,
enums,
type,
} from "superstruct";
const actionConfigStructUser = object({
@ -47,6 +48,10 @@ const actionConfigStructNavigate = object({
confirmation: optional(actionConfigStructConfirmation),
});
const actionConfigStructCustom = type({
action: literal("fire-dom-event"),
});
export const actionConfigStructType = object({
action: enums([
"none",
@ -64,4 +69,5 @@ export const actionConfigStruct = union([
actionConfigStructUrl,
actionConfigStructNavigate,
actionConfigStructService,
actionConfigStructCustom,
]);