InjectImport returns a mutation that appends a value-import statement for the given module to the top of the generated output. ts.ApplyMutations(config.InjectImport("zod", "z")) // import { z } from "zod" Repeat calls for the same module are merged by the underlying (*guts.Typescript).AppendImpo
(module string, names ...string)
| 20 | // config.InjectImport("./schemas", "Foo=Bar") |
| 21 | // // import { Foo as Bar } from "./schemas" |
| 22 | func InjectImport(module string, names ...string) guts.MutationFunc { |
| 23 | return injectImport(module, false, names...) |
| 24 | } |
| 25 | |
| 26 | // InjectTypeImport returns a mutation that appends a type-only import |
| 27 | // statement for the given module: |
searching dependent graphs…