MCPcopy Index your code
hub / github.com/github/copilot-sdk / makeCtx

Function makeCtx

scripts/codegen/rust.ts:408–434  ·  view source on GitHub ↗
(
	definitions?: DefinitionCollections,
	options: {
		unionDiscriminatorProperties?: Set<string> | null;
		allowUntaggedUnions?: boolean;
		allowedUnionTypeNames?: Iterable<string>;
		experimentalTypeNames?: Iterable<string>;
		nonDefaultableTypes?: Iterable<string>;
	} = {},
)

Source from the content-addressed store, hash-verified

406}
407
408function makeCtx(
409 definitions?: DefinitionCollections,
410 options: {
411 unionDiscriminatorProperties?: Set<string> | null;
412 allowUntaggedUnions?: boolean;
413 allowedUnionTypeNames?: Iterable<string>;
414 experimentalTypeNames?: Iterable<string>;
415 nonDefaultableTypes?: Iterable<string>;
416 } = {},
417): RustCodegenCtx {
418 return {
419 structs: [],
420 typeAliases: [],
421 enums: [],
422 generatedNames: new Set(),
423 nonDefaultableTypes: new Set(options.nonDefaultableTypes ?? []),
424 experimentalTypeNames: new Set(options.experimentalTypeNames ?? []),
425 definitions,
426 unionDiscriminatorProperties:
427 options.unionDiscriminatorProperties === null
428 ? undefined
429 : (options.unionDiscriminatorProperties ?? new Set(["kind"])),
430 allowUntaggedUnions: options.allowUntaggedUnions ?? false,
431 allowedUnionTypeNames: new Set(options.allowedUnionTypeNames ?? []),
432 externalTypeRefs: new Map(),
433 };
434}
435
436function pushRustExperimentalDocs(
437 lines: string[],

Callers 2

generateApiTypesCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…