File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,22 @@ const MessageContextTypeValue = {
44
44
EDIT_CONTENT : "edit_content" ,
45
45
} as const ;
46
46
47
-
48
- type MessageContextBase < T extends typeof MessageContextTypeValue [ keyof typeof MessageContextTypeValue ] > = {
47
+ type MessageContextBase <
48
+ T extends
49
+ ( typeof MessageContextTypeValue ) [ keyof typeof MessageContextTypeValue ] ,
50
+ > = {
49
51
type : T ;
50
52
endpoint : string ;
51
- }
52
- export type MessageContextTypeNewContent = MessageContextBase < typeof MessageContextTypeValue . NEW_CONTENT > & { content : { id : null } } ;
53
- export type MessageContextTypeEditContent = MessageContextBase < typeof MessageContextTypeValue . EDIT_CONTENT > & { content : { id : string } } ;
54
- export type MessageContext = MessageContextTypeNewContent | MessageContextTypeEditContent ;
53
+ } ;
54
+ export type MessageContextTypeNewContent = MessageContextBase <
55
+ typeof MessageContextTypeValue . NEW_CONTENT
56
+ > & { content : { id : null } } ;
57
+ export type MessageContextTypeEditContent = MessageContextBase <
58
+ typeof MessageContextTypeValue . EDIT_CONTENT
59
+ > & { content : { id : string } } ;
60
+ export type MessageContext =
61
+ | MessageContextTypeNewContent
62
+ | MessageContextTypeEditContent ;
55
63
56
64
/**
57
65
* microCMS から iFrame に対して onmessage のイベントで渡されるメッセージです。
You can’t perform that action at this time.
0 commit comments