Skip to content

Commit 62a9444

Browse files
mixed already includes null
1 parent 1dcae08 commit 62a9444

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/support/docblocks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ const getAttributeBlocks = (
201201
const getAttributeType = (attr: Eloquent.Attribute): string => {
202202
const type = getActualType(attr.cast || attr.type);
203203

204-
return attr.nullable ? `${type}|null` : type;
204+
if (attr.nullable && type !== "mixed") {
205+
return `${type}|null`
206+
}
207+
208+
return type;
205209
};
206210

207211
const mapType = (type: string): string => {

0 commit comments

Comments
 (0)