MCPcopy Create free account

hub / github.com/Effect-TS/tsgo / functions

Functions2,947 in github.com/Effect-TS/tsgo

↓ 162 callersFunctionremoved
(alternativePattern string)
internal/rules/outdated_api_db.go:33
↓ 153 callersFunctionunchanged
()
internal/rules/outdated_api_db.go:21
↓ 96 callersMethodAddNode
AddNode adds a node with the given data and returns its index.
internal/graph/graph.go:81
↓ 94 callersMethodNewDiagnostic
NewDiagnostic creates a diagnostic using the context's source file and default severity. The loc is the pre-computed error range, message provides the
internal/rule/context.go:49
↓ 76 callersMethodGetTypeAtLocation
GetTypeAtLocation wraps checker.GetTypeAtLocation with node-kind and JSX safety guards. It returns nil when the node is nil, not an expression/type-no
internal/typeparser/get_type_at_location.go:12
↓ 58 callersMethodAddEdge
AddEdge adds a directed edge from source to target with the given data. It panics if either source or target does not exist.
internal/graph/graph.go:160
↓ 54 callersFunctionNew
New creates an empty directed graph.
internal/graph/graph.go:71
↓ 44 callersMethodIsNodeReferenceToEffectModuleApi
IsNodeReferenceToEffectModuleApi reports whether node resolves to a member exported by the "effect" package.
internal/typeparser/effect_type.go:246
↓ 42 callersMethodNewFixAction
NewFixAction creates a tracker, runs the action's edit closure, and returns a *ls.CodeAction wrapping the resulting edits for the current SourceFile.
internal/fixable/context.go:72
↓ 42 callersMethodReplaceNode
(sourceFile *ast.SourceFile, oldNode *ast.Node, newNode *ast.Node, options *change.NodeOptions)
internal/rewriter/tracker.go:51
↓ 38 callersFunctionCached
Cached checks the store for an existing value. On miss, it calls compute, stores the result, and returns it. This correctly caches zero/nil values as
internal/typeparser/type_parser.go:74
↓ 37 callersMethodString
String returns the string representation of the Effect major version.
internal/typeparser/discover.go:28
↓ 36 callersFunctionbuildDiamondGraph
buildDiamondGraph creates: A→B, A→C, B→D, C→D
internal/graph/graph_test.go:11
↓ 34 callersMethodGetErrorRange
GetErrorRange computes the error range for a node in the context's source file. Use this in rules that don't have Analyze functions to get a location
internal/rule/context.go:42
↓ 33 callersFunctionmakeDiag
makeDiag creates a minimal diagnostic with the given code and category.
etsexecutehooks/init_test.go:13
↓ 31 callersMethodSupportedEffectVersion
SupportedEffectVersion returns the normalized supported Effect major version. It returns EffectMajorV4 when v4 is detected, and EffectMajorV3 for all
internal/typeparser/discover.go:102
↓ 30 callersFunctioncollectValues
collectValues collects the values from an iter.Seq2 into a slice.
internal/graph/graph_test.go:36
↓ 28 callersFunctionmakePluginMap
makePluginMap creates an *OrderedMap for testing with the given key-value pairs.
etscore/options_test.go:13
↓ 27 callersMethodEffectType
EffectType parses an Effect type and extracts A, E, R parameters. Returns nil if the type is not an Effect. The detection strategy is chosen based on
internal/typeparser/effect_type.go:35
↓ 27 callersMethodNewRefactorAction
NewRefactorAction creates a tracker, runs the action's edit closure, and returns a *ls.CodeAction wrapping the resulting edits for the current SourceF
internal/refactor/context.go:66
↓ 26 callersMethodEdgeCount
EdgeCount returns the number of edges in the graph.
internal/graph/graph.go:225
↓ 24 callersMethodNodeCount
NodeCount returns the number of nodes in the graph.
internal/graph/graph.go:144
↓ 24 callersFunctionrunComputeChanges
* Helper to create an Assessment.Input and run assess() + computeChanges()
_packages/tsgo/test/setup/changes.test.ts:10
↓ 23 callersMethodUnrollUnionMembers
UnrollUnionMembers returns the constituent types of a union type, or a single-element slice containing the type itself if it's not a union.
internal/typeparser/unroll_members.go:7
↓ 22 callersFunctionParseFromPlugins
ParseFromPlugins parses the @effect/language-service plugin config from the plugins array. The plugins parameter is the value of compilerOptions.plugi
etscore/options_parser.go:12
↓ 22 callersFunctioncloneNodeList
cloneNodeList deep-clones a NodeList if non-nil.
internal/refactors/async_await_to_gen.go:365
↓ 22 callersFunctionmakePlugins
makePlugins wraps plugin maps into the []any structure expected by ParseFromPlugins.
etscore/options_test.go:22
↓ 21 callersMethodLayerType
LayerType parses a Layer type and extracts ROut, E, RIn parameters. Returns nil if the type is not a Layer. The detection strategy is chosen based on
internal/typeparser/layer_type.go:50
↓ 20 callersFunctionFindModuleIdentifier
FindModuleIdentifier resolves the imported identifier name for the given export from the "effect" package. Falls back to the provided exportName if no
internal/typeparser/module_identifier.go:67
↓ 20 callersMethodGetEffectContextFlags
(node *ast.Node)
internal/typeparser/effect_context.go:19
↓ 20 callersFunctionfindPropertyInObject
* Find a property in an object literal expression by name
_packages/tsgo/src/setup/changes.ts:37
↓ 19 callersFunctionnodeText
nodeText extracts the source text of a node from the source file.
internal/typeparser/reconstruct.go:11
↓ 18 callersFunctionCollectEffectDirectives
CollectEffectDirectives scans the source text and returns all Effect directives found.
internal/directives/parser.go:75
↓ 18 callersMethodString
String returns the string representation of a Severity.
etscore/severity.go:42
↓ 17 callersFunctionBuildDirectiveSet
BuildDirectiveSet creates a DirectiveSet from a slice of directives for efficient lookup.
internal/directives/parser.go:140
↓ 17 callersFunctionNewTypeParser
NewTypeParser builds a checker-backed TypeParser.
internal/typeparser/type_parser.go:84
↓ 17 callersFunctioncreateTestAssessmentInput
* Create a test assessment input from plain objects
_packages/tsgo/test/setup/setup-cli.test.ts:11
↓ 17 callersFunctionexpectSetupChanges
* Helper to test setup changes and generate snapshots
_packages/tsgo/test/setup/setup-cli.test.ts:55
↓ 17 callersFunctionmakeNodeInfo
makeNodeInfo creates a minimal LayerGraphNodeInfo for testing walkLeavesMatching. When hasTag is true, Provides gets a non-empty slice so the predicat
internal/layergraph/providers_test.go:12
↓ 17 callersFunctionnewStylePolicy
newStylePolicy creates a stylePolicy from the given resolved options. Package names are lowercased for case-insensitive matching.
internal/autoimportstyle/stylepolicy.go:64
↓ 16 callersFunctionmakeExtendsCompletionItem
makeExtendsCompletionItem creates a CompletionItem for an extends-clause completion. It sets FilterText to accessedText.label so VS Code can filter co
internal/completions/effect_schema_self_in_classes.go:185
↓ 15 callersMethodApply
Apply transforms a fix based on the export's package and the configured style. Returns nil if the fix should be suppressed (e.g., ignored top-level re
internal/autoimportstyle/stylepolicy.go:94
↓ 15 callersMethodGetTypeOfPropertyByName
GetTypeOfPropertyByName returns the type of a property by name. Prefer this when only the property type is needed.
internal/typeparser/helpers.go:63
↓ 15 callersMethodPipingFlows
PipingFlows returns all piping flows found in a source file, sorted by source position.
internal/typeparser/piping_flow.go:236
↓ 15 callersFunctionansi
(text: string, code: string)
_packages/tsgo/src/ansi.ts:19
↓ 15 callersMethodcreateApiCall
createApiCall creates Schema.<name>(...args) (e.g., Schema.Array(Schema.String)).
internal/schemagen/schemagen.go:55
↓ 15 callersMethodcreateApiCall
createApiCall creates Schema.<name>(...args).
internal/schemagen/structural.go:82
↓ 15 callersFunctionisNativeTypescriptVersion
(version: string)
_packages/tsgo/src/setup/consts.ts:17
↓ 15 callersFunctionmakeExport
(packageName string, moduleID autoimport.ModuleID, targetModuleID autoimport.ModuleID)
internal/autoimportstyle/stylepolicy_test.go:53
↓ 14 callersFunctionFilterDiagnosticsForExitCode
FilterDiagnosticsForExitCode filters out Effect diagnostics whose category should be ignored for exit-code determination, based on the exit-code confi
etsexecutehooks/init.go:30
↓ 14 callersFunctioncompileAndGetCheckerAndSourceFile
compileAndGetCheckerAndSourceFile compiles a TypeScript source string and returns the checker, type parser, source file, and a done function to releas
internal/typeparser/expected_and_real_type_test.go:20
↓ 14 callersMethodcreateApiPropertyAccess
createApiPropertyAccess creates Schema.<name> (e.g., Schema.String).
internal/schemagen/schemagen.go:45
↓ 14 callersFunctionmakeAddNewFix
(importKind lsproto.ImportKind, moduleSpecifier string, name string)
internal/autoimportstyle/stylepolicy_test.go:66
↓ 14 callersFunctionvisibleLength
(text: string)
_packages/tsgo/src/ansi.ts:29
↓ 13 callersMethodExpectedAndRealTypes
ExpectedAndRealTypes walks the AST of a source file using breadth-first traversal and collects pairs of expected vs actual types at assignment sites.
internal/typeparser/expected_and_real_type.go:82
↓ 13 callersMethodGetNode
GetNode returns the data for the node at the given index. The second return value is false if the node does not exist.
internal/graph/graph.go:92
↓ 13 callersMethodIsNodeReferenceToEffectSchemaModuleApi
IsNodeReferenceToEffectSchemaModuleApi reports whether node resolves to a member exported by the "effect" package from a module that exports the Schem
internal/typeparser/schema_type.go:142
↓ 13 callersMethodNodes
Nodes iterates all nodes as (index, data) pairs, sorted by index.
internal/graph/graph.go:230
↓ 13 callersFunctionbyteSpanToRange
byteSpanToRange converts a byte offset span to an LSP Range.
internal/completions/effect_schema_self_in_classes.go:193
↓ 13 callersFunctioninsertNodeAtEndOfList
* Insert a node at the end of a list (array or object properties), handling commas properly
_packages/tsgo/src/setup/changes.ts:95
↓ 13 callersMethodvisitNodeAndConnectSlice
(n *ast.Node, targetSlice *GraphSlice, kind ExecutionLinkKind)
internal/typeparser/execution_flow.go:153
↓ 12 callersMethodBytePosToLSPPosition
BytePosToLSPPosition converts a single byte offset in the context's SourceFile to an lsproto.Position using ECMA line/character position.
internal/refactor/context.go:52
↓ 12 callersMethodEffectFnIncludes
EffectFnIncludes checks if a variant is in the configured (or default) effectFn list.
etscore/options.go:194
↓ 12 callersMethodEffectGenCall
EffectGenCall parses a node as Effect.gen(<generator>). Returns nil when the node is not an Effect.gen call.
internal/typeparser/effect_gen.go:20
↓ 12 callersFunctionParseDataForExtendsClassCompletion
ParseDataForExtendsClassCompletion parses position context for a completion in the extends clause of a class declaration. It calls ParseAccessedExpres
internal/completion/position.go:90
↓ 12 callersMethodcreateApiPropertyAccess
createApiPropertyAccess creates Schema.<name>.
internal/schemagen/structural.go:72
↓ 12 callersFunctionsetTimeout
()
testdata/tests/effect-v3/globalTimers.ts:28
↓ 12 callersFunctionsetTimeout
()
testdata/tests/effect-v4/globalTimers.ts:27
↓ 11 callersMethodBytePosToLSPPosition
BytePosToLSPPosition converts a single byte offset in the context's SourceFile to an lsproto.Position using ECMA line/character position.
internal/fixable/context.go:58
↓ 11 callersFunctionEnsurePackageInstalled
(version EffectVersion, packageName string)
internal/bundledeffect/effect.go:34
↓ 11 callersMethodGetEffectiveSeverity
GetEffectiveSeverity returns the effective severity for a rule at a given line. It checks file-level suppressions first, then next-line directives, th
internal/directives/parser.go:187
↓ 11 callersFunctionfilterCompletionItems
(items []*lsproto.CompletionItem, keep func(*lsproto.CompletionItem) bool)
internal/completions/fourslash_test.go:74
↓ 11 callersFunctionmakeCompletionItem
makeCompletionItem creates a CompletionItem with snippet format and a text edit.
internal/completions/effect_schema_self_in_classes.go:162
↓ 11 callersFunctionrenamedSameBehaviour
(newName string)
internal/rules/outdated_api_db.go:25
↓ 10 callersMethodBody
()
internal/typeparser/effect_fn.go:45
↓ 10 callersMethodClone
Clone returns a deep copy of the graph. Node and edge data values are shallow-copied, but all internal maps and slices are independently allocated.
internal/graph/graph.go:453
↓ 10 callersMethodDetectEffectVersion
DetectEffectVersion detects the major version of the Effect library from the program's source files. Returns EffectMajorUnknown if no Effect dependenc
internal/typeparser/discover.go:42
↓ 10 callersMethodIsNodeReferenceToModuleExport
(node *ast.Node, desc PackageSourceFileDescriptor, memberName string)
internal/typeparser/module_export_reference.go:43
↓ 10 callersMethodParsePipeCall
ParsePipeCall detects pipe() and .pipe() call patterns. Returns nil when the node is not a recognized pipe call.
internal/typeparser/piping_flow.go:66
↓ 10 callersMethodToMermaid
ToMermaid renders the graph as a Mermaid flowchart diagram string.
internal/graph/graph.go:745
↓ 10 callersFunctionassertEffectFnFunctionReturnType
(t *testing.T, version bundledeffect.EffectVersion, source string, want string)
internal/typeparser/effect_fn_test.go:40
↓ 10 callersFunctioncompletionItemsAt
(t *testing.T, source string, position int)
internal/completions/fourslash_test.go:29
↓ 10 callersFunctioneffectDiagnosticsCommentItems
(t *testing.T, source string, position int)
internal/completions/fourslash_test.go:120
↓ 10 callersMethodextractCovariantType
extractCovariantType gets the type argument from a covariant property. Covariant<A> is encoded as () => A, so we get the return type.
internal/typeparser/helpers.go:10
↓ 10 callersFunctionmakeOutlineNode
makeOutlineNode creates a LayerOutlineGraphNodeInfo for testing with the given number of provides and requires (using nil pointers, sufficient for ord
internal/layergraph/magic_test.go:159
↓ 10 callersMethodprocessType
processType converts a TypeScript type to a Schema expression, with hoisting support.
internal/schemagen/structural.go:122
↓ 10 callersFunctionrenderLine
* Render a single line with consistent formatting * @param lineNum - Line number (1-based) or undefined for lines without numbers (changes) * @par
_packages/tsgo/src/setup/diff-renderer.ts:30
↓ 9 callersMethodClassNameText
ClassNameText returns the text of the class name node.
internal/completion/position.go:134
↓ 9 callersFunctionFindModuleIdentifierForPackage
FindModuleIdentifierForPackage resolves the imported identifier name for the given module from an arbitrary package. It checks: - Namespace imports: i
internal/typeparser/module_identifier.go:129
↓ 9 callersMethodGetSourceFile
(opts ast.SourceFileParseOptions)
internal/effecttest/vfs.go:62
↓ 9 callersMethodHasNode
HasNode returns true if a node with the given index exists.
internal/graph/graph.go:98
↓ 9 callersMethodbuildSlice
(node ExecutionNode)
internal/typeparser/execution_flow.go:63
↓ 9 callersFunctioneffectCodegensCommentItems
(t *testing.T, source string, position int)
internal/completions/fourslash_test.go:113
↓ 9 callersFunctioneffectJsdocCommentItems
(t *testing.T, source string, position int)
internal/completions/fourslash_test.go:106
↓ 8 callersMethodAccessedObjectText
AccessedObjectText returns the text of the accessed object node.
internal/completion/position.go:129
↓ 8 callersMethodEffectFnCall
EffectFnCall parses a node as an Effect.fn-family call. It supports fn, fnUntraced, and fnUntracedEager, both regular and generator forms.
internal/typeparser/effect_fn.go:166
↓ 8 callersMethodExternals
Externals returns all nodes with no edges in the given direction, in index order. Externals(Outgoing) yields sink/leaf nodes (no outgoing edges). Exte
internal/graph/graph.go:354
↓ 8 callersFunctionGetFunctionLikeBody
GetFunctionLikeBody returns the body node from a function-like node. Handles FunctionDeclaration, FunctionExpression, ArrowFunction, and MethodDeclara
internal/typeparser/function_node.go:42
↓ 8 callersMethodHasEdge
HasEdge returns true if there is an edge from source to target.
internal/graph/graph.go:183
↓ 8 callersFunctionIsCommandLineMode
IsCommandLineMode reports whether the process is currently running in CLI (tsc) mode, as opposed to LSP or other flows.
etscore/climode.go:21
next →1–100 of 2,947, ranked by callers