Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4c718c4b9a
Коммит
2a35a97a18
@@ -4,9 +4,9 @@
|
||||
import {isArrayOf} from './utilities';
|
||||
|
||||
export type PostAction = {
|
||||
id: string;
|
||||
id?: string;
|
||||
type?: string;
|
||||
name: string;
|
||||
name?: string;
|
||||
disabled?: boolean;
|
||||
style?: string;
|
||||
data_source?: string;
|
||||
@@ -20,19 +20,11 @@ export function isPostAction(v: unknown): v is PostAction {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!('id' in v)) {
|
||||
if ('id' in v && typeof v.id !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof v.id !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!('name' in v)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof v.name !== 'string') {
|
||||
if ('name' in v && typeof v.name !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ function isMessageAttachment(v: unknown): v is MessageAttachment {
|
||||
}
|
||||
|
||||
export type MessageAttachmentField = {
|
||||
title: string;
|
||||
value: any;
|
||||
title?: string;
|
||||
value?: unknown;
|
||||
short?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user