Skip to content

Commit be825a5

Browse files
authored
Support Date
for issue : google#13
1 parent d57fa4b commit be825a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lang/ts/intermock.ts

+5
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,11 @@ function traverseInterfaceMembers(
698698
kind = node.type.kind;
699699
typeName = node.type.getText();
700700
}
701+
702+
if (typeName === "Date" && kind == ts.SyntaxKind.TypeReference) {
703+
output[property] = generatePrimitive(property, ts.SyntaxKind.StringKeyword, options, "date.past");
704+
return;
705+
}
701706

702707
switch (kind) {
703708
case ts.SyntaxKind.TypeReference:

0 commit comments

Comments
 (0)