(ts *guts.Typescript)
| 72 | } |
| 73 | |
| 74 | func TSMutations(ts *guts.Typescript) { |
| 75 | ts.ApplyMutations( |
| 76 | // TODO: Remove 'NotNullMaps'. This is hiding potential bugs |
| 77 | // of referencing maps that are actually null. |
| 78 | config.NotNullMaps, |
| 79 | FixSerpentStruct, |
| 80 | DiscriminatedChatMessagePart, |
| 81 | // Prefer enums as types |
| 82 | config.EnumAsTypes, |
| 83 | // Enum list generator |
| 84 | config.EnumLists, |
| 85 | // Export all top level types |
| 86 | config.ExportTypes, |
| 87 | // Readonly interface fields |
| 88 | config.ReadOnly, |
| 89 | // Add ignore linter comments |
| 90 | config.BiomeLintIgnoreAnyTypeParameters, |
| 91 | // Omitempty + null is just '?' in golang json marshal |
| 92 | // number?: number | null --> number?: number |
| 93 | config.SimplifyOmitEmpty, |
| 94 | // TsType: (string | null)[] --> (string)[] |
| 95 | config.NullUnionSlices, |
| 96 | ) |
| 97 | } |
| 98 | |
| 99 | // TypeMappings is all the custom types for codersdk |
| 100 | func TypeMappings(gen *guts.GoParser) error { |
no outgoing calls