diff --git a/src/types/onyx/ReportAction.ts b/src/types/onyx/ReportAction.ts
index 3ec98fd43178..1b420c7dda54 100644
--- a/src/types/onyx/ReportAction.ts
+++ b/src/types/onyx/ReportAction.ts
@@ -10,7 +10,7 @@ import type {Receipt} from './Transaction';
type Message = {
/** The type of the action item fragment. Used to render a corresponding component */
- type: string;
+ type?: string;
/** The text content of the fragment. */
text: string;
diff --git a/tests/unit/isReportMessageAttachmentTest.js b/tests/unit/isReportMessageAttachmentTest.ts
similarity index 87%
rename from tests/unit/isReportMessageAttachmentTest.js
rename to tests/unit/isReportMessageAttachmentTest.ts
index 8338513a7e7e..3014111d5c2c 100644
--- a/tests/unit/isReportMessageAttachmentTest.js
+++ b/tests/unit/isReportMessageAttachmentTest.ts
@@ -1,8 +1,9 @@
+import type {Message} from '@src/types/onyx/ReportAction';
import isReportMessageAttachment from '../../src/libs/isReportMessageAttachment';
describe('isReportMessageAttachment', () => {
it('returns true if a report action is attachment', () => {
- const message = {
+ const message: Message = {
text: '[Attachment]',
html: '',
};
@@ -10,7 +11,7 @@ describe('isReportMessageAttachment', () => {
});
it('returns false if a report action is not attachment', () => {
- let message = {text: '[Attachment]', html: '[Attachment]'};
+ let message: Message = {text: '[Attachment]', html: '[Attachment]'};
expect(isReportMessageAttachment(message)).toBe(false);
message = {text: '[Attachment]', html: '[Attachment]'};