MCPcopy Index your code
hub / github.com/glideapps/quicktype / quicktypeForLanguage

Function quicktypeForLanguage

test/utils.ts:73–100  ·  view source on GitHub ↗
(
  language: languages.Language,
  sourceFile: string,
  sourceLanguage: string,
  alphabetizeProperties: boolean,
  additionalRendererOptions: RendererOptions,
  graphqlSchema?: string
)

Source from the content-addressed store, hash-verified

71}
72
73export async function quicktypeForLanguage(
74 language: languages.Language,
75 sourceFile: string,
76 sourceLanguage: string,
77 alphabetizeProperties: boolean,
78 additionalRendererOptions: RendererOptions,
79 graphqlSchema?: string
80) {
81 try {
82 await quicktype({
83 srcLang: sourceLanguage,
84 lang: language.name,
85 src: [sourceFile],
86 out: language.output,
87 graphqlSchema,
88 topLevel: language.topLevel,
89 alphabetizeProperties,
90 rendererOptions: _.merge(
91 {},
92 language.rendererOptions,
93 additionalRendererOptions
94 ),
95 quiet: true
96 });
97 } catch (e) {
98 failWith("quicktype threw an exception", { error: e });
99 }
100}
101
102export async function inDir(dir: string, work: () => Promise<void>) {
103 let origin = process.cwd();

Callers 5

runQuicktypeMethod · 0.90
testMethod · 0.90
testMethod · 0.90
runQuicktypeMethod · 0.90
runQuicktypeMethod · 0.90

Calls 2

failWithFunction · 0.85
quicktypeFunction · 0.70

Tested by 2

testMethod · 0.72
testMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…