Skip to content

Commit 7042720

Browse files
authored
Merge pull request #83 from microsoftgraph/TS-type-fixes
Update Single and Duration types in TS templates
2 parents 5456bbc + 7f9871c commit 7042720

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/GraphODataTemplateWriter/CodeHelpers/TypeScript/TypeHelperTypeScript.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ public static string GetTypeString(this OdcmProperty prop)
2929
case "Int32":
3030
case "Int64":
3131
case "Double":
32+
case "Single":
3233
case "Binary": // let binary: number = 0b1010;
33-
case "Duration": //Edm.Duration
3434
typeStr = "number";
3535
break;
3636
case "Guid":
37+
case "Duration":
3738
case "String":
3839
typeStr = "string"; //lowercase
3940
break;
@@ -46,9 +47,6 @@ public static string GetTypeString(this OdcmProperty prop)
4647
case "Boolean":
4748
typeStr = "boolean";
4849
break;
49-
case "Single":
50-
typeStr = "any";
51-
break;
5250
case "Byte": //https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/intune_onboarding_rgbcolor
5351
typeStr = "number";
5452
break;
@@ -64,4 +62,4 @@ public static String UpperCaseFirstChar(this String s)
6462

6563

6664
}
67-
}
65+
}

0 commit comments

Comments
 (0)