MCPcopy Create free account
hub / github.com/glideapps/quicktype / separateNamedTypes

Function separateNamedTypes

src/Type.ts:438–444  ·  view source on GitHub ↗
(types: Collection<any, NamedType>)

Source from the content-addressed store, hash-verified

436};
437
438export function separateNamedTypes(types: Collection<any, NamedType>): SeparatedNamedTypes {
439 const classes = types.filter((t: NamedType) => t instanceof ClassType).toOrderedSet() as OrderedSet<ClassType>;
440 const enums = types.filter((t: NamedType) => t instanceof EnumType).toOrderedSet() as OrderedSet<EnumType>;
441 const unions = types.filter((t: NamedType) => t instanceof UnionType).toOrderedSet() as OrderedSet<UnionType>;
442
443 return { classes, enums, unions };
444}
445
446export type StringTypeMatchers<U> = {
447 dateType?: (dateType: PrimitiveType) => U;

Callers 2

emitSourceFunction · 0.90
TypeGraphClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…