MCPcopy Index your code
hub / github.com/coder/coder / TSMutations

Function TSMutations

scripts/apitypings/main.go:74–97  ·  view source on GitHub ↗
(ts *guts.Typescript)

Source from the content-addressed store, hash-verified

72}
73
74func 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
100func TypeMappings(gen *guts.GoParser) error {

Callers 2

TestGenerationFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGenerationFunction · 0.68