tyneq
tyneq
Classes
| Class | Description |
|---|---|
| OperatorMetadata | Metadata describing a registered operator. |
| OperatorRegistry | Central registry for all Tyneq operators. |
| Tyneq | Entry point for creating Tyneq sequences. |
Interfaces
| Interface | Description |
|---|---|
| Enumerator | A pull-based iterator over a sequence. |
| EnumeratorFactory | A factory that produces a fresh Enumerator on demand. |
| Enumerable | A lazy, re-iterable sequence. |
| TyneqSequence | The primary public API for a lazy sequence - the type returned by all Tyneq operators. |
| TyneqOrderedSequence | A TyneqSequence with additional secondary sort keys applied. |
| TyneqCachedSequence | A TyneqSequence that caches elements as they are iterated. |
| OperatorEntry | A fully resolved operator entry: metadata plus the prototype-level implementation. |
Type Aliases
| Type Alias | Description |
|---|---|
| CacheResult | Result returned by the cache-lookup method on a memoized sequence. |
| MinMaxResult | Result of minMax(), containing both the minimum and maximum elements. |
| KeyValuePair | A key-value pair used by toMap() and toRecord() selectors. |
| OperatorSource | Source of an operator implementation, used internally to track where operators come from. |
| OperatorKind | Kind of an operator, used internally to categorize operators. Extends OperatorCategory with registry-only kinds. |
| SequenceConstructor | Constructor type for a sequence class. |
| Nullable | `T |
| Maybe | `T |
| Optional | `T |
| HasLength | Any object with a length property. |
| GenericFunction | Any function with any number of arguments. |
| Constructor | A constructor type that can be instantiated with new. |
| InstanceOf | A type that extracts the instance type from a constructor. |
| NoInfer | A type that prevents inference of T in generic functions. |
| Action | A function that takes arguments of type TArgs (tuple) and returns void. |
| Predicate | A function that takes arguments of type TArgs (tuple) and returns a boolean. |
| ItemPredicate | A predicate over a sequence element and its zero-based index. |
| ItemSelector | A projection over a sequence element and its zero-based index. |
| ItemAction | A side-effect action over a sequence element and its zero-based index. |
| Func | A function that takes arguments of type TArgs (tuple) and returns a value of type TResult. |
| BoundMethod | A method callable on a specific this context, returning TReturn. |
| Method | A method callable on any this context with unknown arguments. |
| Factory | A factory function that creates an instance of type TInstance given arguments of type TArgs. |
| WithProperties | A type representing an object with assignable properties. |
Decorators
| Function | Description |
|---|---|
| cachedOperator | Class decorator that registers a TyneqCachedEnumerator subclass as an operator available only on cached sequences. |
| cachedTerminal | Class decorator that registers a TyneqCachedTerminalOperator subclass as a terminal operator available only on cached sequences. |
| operator | Class decorator that registers a TyneqEnumerator subclass as an operator on every sequence. |
| orderedOperator | Class decorator that registers a TyneqOrderedEnumerator subclass as an operator available only on ordered sequences. |
| orderedTerminal | Class decorator that registers a TyneqOrderedTerminalOperator subclass as a terminal operator available only on ordered sequences. |
| terminal | Class decorator that registers a class as a terminal operator. |
Errors
| Class | Description |
|---|---|
| CompilerError | Thrown when the query plan compiler encounters a structural or semantic error while compiling a query plan into an executable sequence. |
| InvalidOperationError | Thrown when a method call is invalid for the current state of the object. |
| KeyNotFoundError | Thrown when a lookup is performed with a key that does not exist in the collection. |
| NotSupportedError | Thrown when a requested operation is not supported. |
| PluginError | Thrown when a plugin, decorator (@operator, @terminal), or factory (createOperator, createTerminalOperator) is used incorrectly. |
| ReflectionError | Thrown when a prototype reflection operation fails - for example, when a method that is expected to exist on a prototype cannot be found. |
| RegistryError | Thrown when the operator registry encounters a conflict or invalid state during operator registration or invocation. |
| SequenceContainsNoElementsError | Thrown when an element is required from a sequence that contains no elements. |
| TyneqError | Base class for all errors thrown by Tyneq. |
| ArgumentError | Thrown when a method argument fails validation. |
| ArgumentNullError | Thrown when a required argument is null. |
| ArgumentOutOfRangeError | Thrown when an argument is outside the valid range. |
| ArgumentTypeError | Thrown when an argument has the wrong type. |
| ValidationError | Thrown when multiple argument validations fail simultaneously. |
Factory Functions
| Function | Description |
|---|---|
| createCachedOperator | Registers a factory function as an operator available only on cached sequences, where the factory fully controls the return type. |
| createCachedTerminalOperator | Registers a terminal operator available only on cached sequences. |
| createGeneratorOperator | Registers an operator using a generator function. |
| createOperator | Registers a streaming or buffering operator using a factory function. |
| createOrderedOperator | Registers a factory function as an operator available only on ordered sequences, where the factory fully controls the return type. |
| createOrderedTerminalOperator | Registers a terminal operator available only on ordered sequences. |
| createTerminalOperator | Registers a terminal operator using a plain function. |
Plugin
| Class | Description |
|---|---|
| TyneqBaseEnumerator | Abstract base class implementing the pull-iterator lifecycle for all Tyneq enumerators. |
| TyneqEnumerator | Base class for all pipeline operator enumerators (streaming and buffering). |
| TyneqCachedTerminalOperator | Abstract base for terminal operators that require a fully cached sequence. |
| TyneqOrderedTerminalOperator | Abstract base for terminal operators that require a fully ordered sequence. |
| TyneqTerminalOperator | Abstract base for all terminal operators. |
QueryPlan
| Name | Description |
|---|---|
| QueryPlanOptimizer | A built-in QueryPlanTransformer that fuses redundant consecutive operators. |
| QueryPlanPrinter | Converts a query plan tree into a human-readable multi-line string. |
| QueryPlanTransformer | Base class for immutable query plan rewriting. |
| QueryPlanWalker | Concrete base class for side-effect query plan visitors. |
| CompileOptions | Options for QueryPlanCompiler.compile and QueryPlanCompiler.compileRaw. |
| QueryPlanCompiler | Compiles a query plan tree into an executable TyneqSequence. |
| tyneqQueryNode | Symbol key used to access the QueryPlanNode on a TyneqSequence. |
| OperatorCategory | Categories of operators. |
| SourceKind | The JavaScript collection type that backs a source node. |
| IQueryNode | A node in the query plan tree representing one operator in a pipeline. |
| isSourceNode | Narrows a QueryPlanNode to one that is guaranteed to have a sourceKind. |
| QueryPlanTraversalDirection | Traversal direction for QueryPlanWalker. |
| QueryPlanWalkerOptions | Options for QueryPlanWalker. |
| QueryPlanVisitor | Visitor for traversing a query plan tree. |
| QueryPlanPrinterOptions | Options for QueryPlanPrinter. |
Reflection
| Name | Description |
|---|---|
| MethodDescriptor | Describes a method (function-valued own property) on a reflected target. |
| DataDescriptor | Describes a data property (non-function own value property) on a reflected target. |
| AccessorDescriptor | Describes an accessor property (get and/or set) on a reflected target. |
| MemberDescriptor | A discriminated union of all member descriptor types returned by ReflectionContext. |
| ReflectOptions | Options for the reflect factory. |
| ReflectionContext | The result of a reflect call. Provides typed access to the members of the reflected target. |
| reflect | Creates a ReflectionContext for the given target. |
Types
| Type Alias | Description |
|---|---|
| Comparer | A function that compares two values for ordering. |
| EqualityComparer | A function that tests two values for equality. |
| IteratorFactory | Function that produces a fresh Enumerator each time it is called. |
| Assume | Narrows T to U if T extends U; otherwise falls back to U. |
| Cast | Identity type - preserves T as-is with no structural transformation. |
| MethodKeys | Extracts the keys of T whose value type extends Function (i.e. methods). |
| FieldKeys | Extracts the keys of T whose value type does NOT extend Function (i.e. data fields). |
Utilities
| Class | Description |
|---|---|
| TyneqComparer | Built-in comparers and equality comparers used by ordering and equality operators. |
| ArgumentUtility | Facade for all argument validation guards. |
| Lazy | Utility class for lazy initialization of values. |
| TypeGuardUtility | Type guard predicates for Tyneq's core protocol types. |
| ValidationBuilder | Accumulates validation errors and throws a single ValidationError containing all of them. |