Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Effect-TS/tsgo
/ functions
Functions
2,947 in github.com/Effect-TS/tsgo
⨍
Functions
2,947
◇
Types & classes
1,081
↓ 3 callers
Function
runAndCapture
* Run renderCodeActions and capture all console output lines
_packages/tsgo/test/setup/diff-renderer.test.ts:14
↓ 3 callers
Function
severityFromMap
(resolved map[string]etscore.Severity, ruleName string)
internal/rulerunner/diagnostics.go:243
↓ 3 callers
Method
verifyLayerMethodAtCall
verifyLayerMethodAtCall checks if a call expression is a Layer method call (direct or curried) and returns the tag text (e.g., "MyService") or empty s
internal/typeparser/effect_fn_opportunity.go:529
↓ 2 callers
Method
AffectedLine
AffectedLine returns the line number that this directive affects. For regular directives, it affects the same line. For -next-line directives, it affe
internal/directives/parser.go:56
↓ 2 callers
Function
AllCodes
AllCodes returns all diagnostic codes from the given rules.
internal/rule/rule.go:51
↓ 2 callers
Function
AnalyzeCatchAllToMapError
AnalyzeCatchAllToMapError finds all Effect.catch callbacks that simply wrap the error with Effect.fail, which can be simplified to Effect.mapError.
internal/rules/catch_all_to_map_error.go:47
↓ 2 callers
Function
AnalyzeCatchToIgnore
AnalyzeCatchToIgnore finds Effect.catch/catchCause callbacks that return Effect.void where the resulting success channel is void-like, so Effect.ignor
internal/rules/catch_to_ignore.go:47
↓ 2 callers
Function
AnalyzeCatchToOrElseSucceed
AnalyzeCatchToOrElseSucceed finds Effect.catch callbacks that ignore the error and return Effect.succeed, which can be simplified to Effect.orElseSucc
internal/rules/catch_to_or_else_succeed.go:46
↓ 2 callers
Function
AnalyzeClassSelfMismatch
AnalyzeClassSelfMismatch finds all class declarations where the Self type parameter does not match the class name.
internal/rules/class_self_mismatch.go:48
↓ 2 callers
Function
AnalyzeDeterministicKeys
AnalyzeDeterministicKeys finds all class declarations where the key string literal doesn't match the expected deterministic key.
internal/rules/deterministic_keys.go:49
↓ 2 callers
Function
AnalyzeEffectFnIife
AnalyzeEffectFnIife finds all Effect.fn or Effect.fnUntraced calls that are immediately invoked (IIFE pattern) in the given source file.
internal/rules/effect_fn_iife.go:63
↓ 2 callers
Function
AnalyzeEffectFnOpportunity
AnalyzeEffectFnOpportunity finds all functions that can be converted to Effect.fn in the given source file.
internal/rules/effect_fn_opportunity.go:51
↓ 2 callers
Function
AnalyzeEffectMapVoid
AnalyzeEffectMapVoid finds all Effect.map calls with void callbacks that can be replaced with Effect.asVoid.
internal/rules/effect_map_void.go:88
↓ 2 callers
Function
AnalyzeEffectSucceedWithVoid
AnalyzeEffectSucceedWithVoid finds all Effect.succeed(undefined) and Effect.succeed(void 0) calls that can be replaced with Effect.void.
internal/rules/effect_succeed_with_void.go:64
↓ 2 callers
Function
AnalyzeInstanceOfSchema
AnalyzeInstanceOfSchema finds all `value instanceof SchemaClass` expressions where the right-hand side is an Effect Schema type.
internal/rules/instance_of_schema.go:45
↓ 2 callers
Function
AnalyzeLayerMergeAllWithDependencies
AnalyzeLayerMergeAllWithDependencies finds all Layer.mergeAll calls with interdependencies where one layer provides a service required by another.
internal/rules/layer_merge_all_with_dependencies.go:50
↓ 2 callers
Function
AnalyzeMissedPipeableOpportunity
AnalyzeMissedPipeableOpportunity finds all nested call chains that can be converted to .pipe() style.
internal/rules/missed_pipeable_opportunity.go:60
↓ 2 callers
Function
AnalyzeMissingEffectError
AnalyzeMissingEffectError finds all relation errors where an Effect has error types that are not handled by the expected type.
internal/rules/missing_effect_error.go:50
↓ 2 callers
Function
AnalyzeMissingReturnYieldStar
AnalyzeMissingReturnYieldStar finds all yield* expressions inside Effect generators where the yielded Effect never succeeds, suggesting "return yield*
internal/rules/missing_return_yield_star.go:44
↓ 2 callers
Function
AnalyzeMissingStarInYieldEffectGen
AnalyzeMissingStarInYieldEffectGen finds all yield expressions inside Effect generators that are missing the asterisk (yield instead of yield*).
internal/rules/missing_star_in_yield_effect_gen.go:44
↓ 2 callers
Function
AnalyzeMultipleEffectProvide
AnalyzeMultipleEffectProvide finds all consecutive Effect.provide call chains with Layer-typed arguments within piping flows.
internal/rules/multiple_effect_provide.go:46
↓ 2 callers
Function
AnalyzeNewSchemaClass
(tp *typeparser.TypeParser, c *checker.Checker, sf *ast.SourceFile)
internal/rules/new_schema_class.go:48
↓ 2 callers
Function
AnalyzeOverriddenSchemaConstructor
AnalyzeOverriddenSchemaConstructor finds all class declarations extending Schema that have an overridden constructor which is not an allowed passthrou
internal/rules/overridden_schema_constructor.go:42
↓ 2 callers
Function
AnalyzeRedundantSchemaTagIdentifier
AnalyzeRedundantSchemaTagIdentifier finds all class declarations where the identifier string literal equals the tag value in Schema.TaggedClass/Tagged
internal/rules/redundant_schema_tag_identifier.go:44
↓ 2 callers
Function
AnalyzeReturnEffectInGen
AnalyzeReturnEffectInGen finds all return statements inside Effect generators that return an Effect-able type, returning matches with both the diagnos
internal/rules/return_effect_in_gen.go:43
↓ 2 callers
Function
AnalyzeRunEffectInsideEffect
AnalyzeRunEffectInsideEffect finds all Effect.run* calls inside Effect generators, returning matches with structured data for both diagnostics and qui
internal/rules/run_effect_inside_effect.go:66
↓ 2 callers
Function
AnalyzeSchemaNumber
(tp *typeparser.TypeParser, sf *ast.SourceFile)
internal/rules/schema_number.go:38
↓ 2 callers
Function
AnalyzeSchemaStructWithTag
AnalyzeSchemaStructWithTag finds all Schema.Struct({ _tag: Schema.Literal("..."), ... }) call expressions and returns match structs for each.
internal/rules/schema_struct_with_tag.go:47
↓ 2 callers
Function
AnalyzeSchemaUnionOfLiterals
AnalyzeSchemaUnionOfLiterals finds all Schema.Union(...) calls where every argument is a Schema.Literal(...) call, returning matches with captured nod
internal/rules/schema_union_of_literals.go:46
↓ 2 callers
Function
AnalyzeScopeInLayerEffect
AnalyzeScopeInLayerEffect finds all Layer.effect*() calls and class declarations with Default layer properties where Scope is in the layer's requireme
internal/rules/scope_in_layer_effect.go:45
↓ 2 callers
Function
AnalyzeServiceNotAsClass
AnalyzeServiceNotAsClass finds all const variable declarations using the v4 service constructor that should be class declarations instead. V4-only rul
internal/rules/service_not_as_class.go:50
↓ 2 callers
Function
AnalyzeUnnecessaryArrowBlock
(_ *typeparser.TypeParser, _ *checker.Checker, sf *ast.SourceFile)
internal/rules/unnecessary_arrow_block.go:48
↓ 2 callers
Function
AnalyzeUnnecessaryFailYieldableError
AnalyzeUnnecessaryFailYieldableError finds all yield* Effect.fail(...) calls where the argument is a yieldable error type that can be yielded directly
internal/rules/unnecessary_fail_yieldable_error.go:45
↓ 2 callers
Function
AnalyzeUnnecessaryPipe
AnalyzeUnnecessaryPipe finds all pipe() and .pipe() calls with no transformation arguments, returning matches with both the diagnostic and the parsed
internal/rules/unnecessary_pipe.go:44
↓ 2 callers
Function
AnalyzeUnnecessaryPipeChain
AnalyzeUnnecessaryPipeChain finds all chained pipe() and .pipe() calls (outer pipe whose subject is also a pipe call), returning matches with the diag
internal/rules/unnecessary_pipe_chain.go:46
↓ 2 callers
Function
AnalyzeUnnecessaryTypeofType
(tp *typeparser.TypeParser, c *checker.Checker, sf *ast.SourceFile)
internal/rules/unnecessary_typeof_type.go:41
↓ 2 callers
Function
AnalyzeUnsafeEffectTypeAssertion
(tp *typeparser.TypeParser, c *checker.Checker, sf *ast.SourceFile)
internal/rules/unsafe_effect_type_assertion.go:51
↓ 2 callers
Function
BaselineLocalPath
BaselineLocalPath returns the path to write local baselines.
internal/effecttest/baseline.go:32
↓ 2 callers
Function
BaselineReferencePath
BaselineReferencePath returns the path to reference baselines.
internal/effecttest/baseline.go:37
↓ 2 callers
Function
CodeToRuleName
CodeToRuleName returns the rule name for a diagnostic code. Returns empty string if the code is not found in any rule.
internal/rule/rule.go:61
↓ 2 callers
Function
ConvertOutlineGraphToLayerMagic
ConvertOutlineGraphToLayerMagic takes an outline graph and a set of target output types, then computes an ordered list of layer nodes annotated with m
internal/layergraph/magic.go:15
↓ 2 callers
Method
DetectEffectVersionString
DetectEffectVersionString returns the exact version string of the Effect library. Returns "unknown" if no Effect dependency is found, if the version i
internal/typeparser/discover.go:115
↓ 2 callers
Function
DiscoverDocumentSymbolTestCases
DiscoverDocumentSymbolTestCases finds all .ts test files in the document-symbol test cases directory.
internal/effecttest/document_symbols_runner.go:29
↓ 2 callers
Function
DiscoverRefactorTestCases
DiscoverRefactorTestCases finds all .ts test files in the refactor test cases directory.
internal/effecttest/refactor_runner.go:25
↓ 2 callers
Method
EffectYieldableType
EffectYieldableType resolves both plain Effect types and yieldable wrappers that implement the asEffect() protocol. For v3: delegates directly to Effe
internal/typeparser/effect_yieldable_type.go:14
↓ 2 callers
Method
ExtendsContextTag
ExtendsContextTag checks if a class declaration extends Context.Tag("key")<Self, Shape>(). It detects the pattern: class X extends Context.Tag("key"
internal/typeparser/extends_context_tag.go:24
↓ 2 callers
Method
ExtendsSchemaTaggedClass
ExtendsSchemaTaggedClass checks if a class declaration extends Schema.TaggedClass<T>("identifier")("tag", { ... }).
internal/typeparser/extends_schema_tagged.go:114
↓ 2 callers
Method
ExtendsSchemaTaggedRequest
ExtendsSchemaTaggedRequest checks if a class declaration extends Schema.TaggedRequest<T>("identifier")("tag", { ... }).
internal/typeparser/extends_schema_tagged.go:136
↓ 2 callers
Function
ExtractProvidersAndRequirers
ExtractProvidersAndRequirers extracts summary information about which layers provide or require which services. It uses a two-step algorithm: Step 1:
internal/layergraph/providers.go:67
↓ 2 callers
Method
FindEdge
FindEdge returns the index of the first edge (in index order) matching the predicate. The predicate receives (edgeData, source, target). Returns (0, f
internal/graph/graph.go:295
↓ 2 callers
Method
FindEdges
FindEdges returns the indices of all edges matching the predicate, in index order. The predicate receives (edgeData, source, target).
internal/graph/graph.go:312
↓ 2 callers
Method
FindNode
FindNode returns the index of the first node (in index order) matching the predicate. Returns (0, false) if no node matches.
internal/graph/graph.go:263
↓ 2 callers
Method
FindNodes
FindNodes returns the indices of all nodes matching the predicate, in index order.
internal/graph/graph.go:278
↓ 2 callers
Function
FormatNestedLayerGraph
FormatNestedLayerGraph renders the layer graph as a Mermaid flowchart TB with nested subgraphs.
internal/layergraph/format.go:175
↓ 2 callers
Function
FormatOutlineGraph
FormatOutlineGraph renders the outline graph as a Mermaid flowchart TD.
internal/layergraph/format.go:284
↓ 2 callers
Function
FormatQuickInfo
FormatQuickInfo renders provider/requirer info as a JSDoc comment.
internal/layergraph/format.go:307
↓ 2 callers
Method
GetChanges
()
internal/rewriter/tracker.go:46
↓ 2 callers
Method
GetIncludeSuggestionsInTsc
GetIncludeSuggestionsInTsc returns whether suggestion diagnostics should appear in tsc output. Returns true (include suggestions) when the receiver is
etscore/options.go:233
↓ 2 callers
Method
GetKeyPatterns
GetKeyPatterns returns the configured key patterns or the defaults if none are configured.
etscore/options.go:255
↓ 2 callers
Method
HasEffectTypeId
HasEffectTypeId returns true if the type has the Effect type identifier. For v4, this is a quick check for the "~effect/Effect" property. For v3/unkno
internal/typeparser/effect_type.go:202
↓ 2 callers
Method
IsEffectType
IsEffectType returns true if the type has the Effect variance struct.
internal/typeparser/effect_type.go:119
↓ 2 callers
Method
IsGlobalErrorType
IsGlobalErrorType reports whether the given type is exactly the global Error type. It performs a bidirectional assignability check to ensure the type
internal/typeparser/global_error.go:12
↓ 2 callers
Method
IsNodeReferenceToEffectModelModuleApi
IsNodeReferenceToEffectModelModuleApi reports whether node resolves to a member exported by the "effect" package from a module that exports the Model
internal/typeparser/effect_model_type.go:47
↓ 2 callers
Method
IsNodeReferenceToEffectSqlModelModuleApi
IsNodeReferenceToEffectSqlModelModuleApi reports whether node resolves to a member exported by the "@effect/sql" package from a module that exports th
internal/typeparser/sql_model_type.go:40
↓ 2 callers
Method
IsScopeType
IsScopeType returns true if the type is an Effect Scope type. For v4, this checks for the "~effect/Scope" computed property. For v3/unknown, this chec
internal/typeparser/scope_type.go:17
↓ 2 callers
Method
IsServiceType
IsServiceType returns true if the type has the Service variance struct.
internal/typeparser/service_type.go:64
↓ 2 callers
Method
IsSourceFileInPackage
(sf *ast.SourceFile, packageName string)
internal/typeparser/module_export_reference.go:31
↓ 2 callers
Method
IsSuppressed
IsSuppressed returns true if the given rule is suppressed (off or skip-file) at the given line.
internal/directives/parser.go:228
↓ 2 callers
Method
MapNodes
MapNodes applies fn to every node's data in-place.
internal/graph/graph.go:437
↓ 2 callers
Function
MetadataGroups
()
internal/rules/metadata.go:17
↓ 2 callers
Function
New
New creates a SchemaGen from the given tracker and source file, resolving the Schema import identifier automatically.
internal/schemagen/schemagen.go:35
↓ 2 callers
Function
NewContext
NewContext creates a new Context for a rule invocation.
internal/rule/context.go:28
↓ 2 callers
Function
NewTracker
(raw *change.Tracker)
internal/rewriter/tracker.go:38
↓ 2 callers
Function
PackagePath
(version EffectVersion, packageName string)
internal/bundledeffect/effect.go:30
↓ 2 callers
Method
Process
Process converts an interface or type alias declaration into a schema statement. On error, returns a comment node describing the error.
internal/schemagen/schemagen.go:694
↓ 2 callers
Function
ReconstructPipingFlow
ReconstructPipingFlow reconstructs a piping flow into a string expression by applying transformations sequentially. For example: subject with transfor
internal/typeparser/reconstruct.go:31
↓ 2 callers
Method
ReferenceSymbolAtNode
(node *ast.Node)
internal/typeparser/module_export_reference.go:15
↓ 2 callers
Method
Reverse
Reverse reverses the direction of all edges in the graph in-place.
internal/graph/graph.go:400
↓ 2 callers
Function
RunEffectDocumentSymbolsTest
RunEffectDocumentSymbolsTest executes one document-symbol baseline test case.
internal/effecttest/document_symbols_runner.go:49
↓ 2 callers
Function
RunEffectQuickFixTest
RunEffectQuickFixTest executes a single Effect quick-fix baseline test case. It creates a fourslash test instance, collects quick-fix inventory and ap
internal/effecttest/quickfix_runner.go:25
↓ 2 callers
Function
RunEffectRefactorTest
RunEffectRefactorTest executes a single Effect refactor baseline test case. It creates a fourslash test instance, collects refactor inventory and appl
internal/effecttest/refactor_runner.go:115
↓ 2 callers
Function
RunEffectTest
RunEffectTest executes a single Effect diagnostic test case for the given version.
internal/effecttest/runner.go:127
↓ 2 callers
Method
SourceFiles
()
internal/typeparser/yieldable_error.go:12
↓ 2 callers
Function
TestDataPath
TestDataPath returns the path to our testdata directory.
internal/effecttest/baseline.go:27
↓ 2 callers
Method
UpdateEdge
UpdateEdge applies fn to the data of the edge at the given index. If the edge does not exist, this is a no-op.
internal/graph/graph.go:206
↓ 2 callers
Method
UpdateNode
UpdateNode applies fn to the data of the node at the given index. If the node does not exist, this is a no-op.
internal/graph/graph.go:105
↓ 2 callers
Function
adjustedNode
adjustedNode redirects from a variable/property declaration name to the initializer.
internal/refactors/layer_magic.go:59
↓ 2 callers
Function
analyzeSchemaNumberReference
(tp *typeparser.TypeParser, sf *ast.SourceFile, node *ast.Node)
internal/rules/schema_number.go:72
↓ 2 callers
Function
asStringAnyMap
(value any)
etscore/options_parser.go:412
↓ 2 callers
Function
assertMountedEffect
(t *testing.T, testfs map[string]any)
etstesthooks/init_test.go:52
↓ 2 callers
Function
assertSourcePackageName
(t *testing.T, testfs map[string]any, want string)
etstesthooks/init_test.go:62
↓ 2 callers
Function
buildEffectFnCall
buildEffectFnCall builds: Effect.fn("name")(function*(params) { body })
internal/refactors/async_await_to_fn.go:79
↓ 2 callers
Function
buildEffectGenCall
buildEffectGenCall builds: Effect.gen(function*() { body })
internal/refactors/async_await_to_gen.go:240
↓ 2 callers
Function
buildFixableCodes
buildFixableCodes returns a set of diagnostic codes that have non-disable fixables.
internal/rules/rules_json_test.go:175
↓ 2 callers
Function
buildFnDeclaration
buildFnDeclaration builds the appropriate declaration wrapping the Effect.fn call. For function declarations: const name = Effect.fn("name")(...) For
internal/refactors/async_await_to_fn.go:153
↓ 2 callers
Function
buildNonAsyncDeclaration
buildNonAsyncDeclaration builds a new function declaration/expression/arrow without the async modifier, with the given effectGenCall as the new body.
internal/refactors/async_await_to_gen.go:276
↓ 2 callers
Function
buildTaggedErrorClass
buildTaggedErrorClass builds: class ErrorN extends Data.TaggedError("ErrorN")<{ cause: unknown }> {}
internal/refactors/async_await_to_gen_try_promise.go:211
↓ 2 callers
Function
buildYieldStarPromise
buildYieldStarPromise builds: yield* Effect.promise(() => expr)
internal/refactors/async_await_to_gen.go:209
↓ 2 callers
Function
buildYieldStarTryPromise
buildYieldStarTryPromise builds: yield* Effect.tryPromise({ try: () => expr, catch: cause => new ErrorN({ cause }) })
internal/refactors/async_await_to_gen_try_promise.go:121
↓ 2 callers
Function
categoryToString
categoryToString converts a diagnostic category to its lowercase string representation.
internal/effecttest/baseline.go:214
← previous
next →
301–400 of 2,947, ranked by callers