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

Method DetectEffectVersion

internal/typeparser/discover.go:42–53  ·  view source on GitHub ↗

DetectEffectVersion detects the major version of the Effect library from the program's source files. Returns EffectMajorUnknown if no Effect dependency is found or if conflicting versions are detected. The result is cached per checker lifetime.

()

Source from the content-addressed store, hash-verified

40// source files. Returns EffectMajorUnknown if no Effect dependency is found or if
41// conflicting versions are detected. The result is cached per checker lifetime.
42func (tp *TypeParser) DetectEffectVersion() EffectMajorVersion {
43 if tp == nil || tp.checker == nil {
44 return EffectMajorUnknown
45 }
46 if tp.links.detectEffectVersionComputed {
47 return tp.links.detectEffectVersionValue
48 }
49 result := tp.detectEffectVersionUncached()
50 tp.links.detectEffectVersionValue = result
51 tp.links.detectEffectVersionComputed = true
52 return result
53}
54
55// detectEffectVersionUncached performs the actual version detection logic.
56func (tp *TypeParser) detectEffectVersionUncached() EffectMajorVersion {

Callers 10

EffectSchemaTypesMethod · 0.95
StreamTypeMethod · 0.95
LayerTypeMethod · 0.95
ServiceTypeMethod · 0.95
ContextTagMethod · 0.95
EffectTypeMethod · 0.95
HasEffectTypeIdMethod · 0.95
IsScopeTypeMethod · 0.95
EffectYieldableTypeMethod · 0.95

Calls 1

Tested by

no test coverage detected