MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / cloneOptions

Function cloneOptions

internal/pluginoptions/resolver.go:107–125  ·  view source on GitHub ↗
(config *etscore.EffectPluginOptions)

Source from the content-addressed store, hash-verified

105}
106
107func cloneOptions(config *etscore.EffectPluginOptions) *etscore.ResolvedEffectPluginOptions {
108 if config == nil {
109 return nil
110 }
111
112 cloned := etscore.ResolvedEffectPluginOptions{
113 NamespaceImportPackages: append([]string(nil), config.NamespaceImportPackages...),
114 BarrelImportPackages: append([]string(nil), config.BarrelImportPackages...),
115 ImportAliases: cloneStringMap(config.ImportAliases),
116 TopLevelNamedReexports: config.TopLevelNamedReexports,
117 KeyPatterns: cloneKeyPatterns(config.KeyPatterns),
118 ExtendedKeyDetection: config.ExtendedKeyDetection,
119 PipeableMinArgCount: config.PipeableMinArgCount,
120 AllowedDuplicatedPackages: append([]string(nil), config.AllowedDuplicatedPackages...),
121 EffectFn: append([]string(nil), config.EffectFn...),
122 }
123
124 return &cloned
125}
126
127func cloneDiagnosticSeverity(input map[string]etscore.Severity) map[string]etscore.Severity {
128 if input == nil {

Calls 2

cloneStringMapFunction · 0.70
cloneKeyPatternsFunction · 0.70

Tested by

no test coverage detected