MCPcopy Create free account
hub / github.com/coder/guts / InjectTypeImport

Function InjectTypeImport

config/imports.go:33–35  ·  view source on GitHub ↗

InjectTypeImport returns a mutation that appends a type-only import statement for the given module: ts.ApplyMutations(config.InjectTypeImport("./schemas", "Foo")) // import type { Foo } from "./schemas" Aliasing follows the same "Name=Alias" form as InjectImport.

(module string, names ...string)

Source from the content-addressed store, hash-verified

31//
32// Aliasing follows the same "Name=Alias" form as InjectImport.
33func InjectTypeImport(module string, names ...string) guts.MutationFunc {
34 return injectImport(module, true, names...)
35}
36
37// InjectSideEffectImport returns a mutation that appends a bare side-effect
38// import for the given module:

Calls 1

injectImportFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…