We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isEnum
1 parent 0487897 commit 4b25f8bCopy full SHA for 4b25f8b
packages/content-format/src/nodes/EmbedNode.ts
@@ -1,6 +1,6 @@
1
import { OEmbedInfo as OEmbed } from '../common';
2
import { Element } from '../Element';
3
-import { isNonEmptyString, isUuid } from '../validation';
+import { isEnum, isNonEmptyString, isUuid } from '../validation';
4
5
export interface EmbedNode extends Element<typeof EmbedNode.TYPE> {
6
uuid: string;
@@ -28,6 +28,7 @@ export namespace EmbedNode {
28
const isValid =
29
isEmbedNode(value) &&
30
isNonEmptyString(value.url) &&
31
+ isEnum(value.layout, Layout) &&
32
isUuid(value.uuid) &&
33
OEmbed.isOEmbedInfo(value.oembed);
34
0 commit comments