Skip to main content
Home

@fathym/common@0.2.274
Built and signed on GitHub Actions

The Fathym reference architecture, used for cross cutting concerns and repeatable design patterns.

This package works with Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
94%
Published
a month ago (0.2.274)

default

Common reference architecture and cross cutting concerns.

T
$Tag

$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference. The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol. If the TTag type is never or undefined, the tag is omitted.

T
$TagDeepStrip

$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.

T
$TagDeepStripArray

$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.

T
$TagDeepStripObject

$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.

T
$TagDeepStripTuple

$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.

T
$TagExists

$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T. The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.

T
$TagExtract

$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.

T
$TagExtractDataKeys

Extracts all data keys from a $Tag based on a tag type TType.

T
$TagExtractValue

$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T based on a tag type TType and tag data TData.

T
$TagExtractValueAndStrip

$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it along with the stripped version of the type.

T
$TagExtractValues

$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T in a nested structure, based on tag type TType and tag data TData.

T
$TagStrip

$TagStrip<T, TType, TTag, TData, TExact> removes tag metadata from a property.

T
$TagValues

$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata values during type inference. It allows attaching multiple key-value pairs (TValues) alongside the primary tag.

T
AssertEquals
No documentation available
T
BaseRequest

The base request object for all API requests.

T
BaseResponse

The base response object for API requests.

T
BaseResponseModel

The base response object for API requests including a model.

f
buildURLMatch
No documentation available
f
computeBaseHref
No documentation available
f
concatUint8Arrays

Concatenate two Uint8Array objects into a new Uint8Array object.

f
convertAsyncIterable

Convert an async iterable to an async iterable of another type.

f
createIfNotExists

Creates a directory if it doesn't exist (async). If the directory already exists, no action is taken.

f
createIfNotExistsSync

Creates a directory if it doesn't exist (sync). If the directory already exists, no action is taken.

N
djwt
No documentation available
f
establishHeaders

Establishes headers for an HTTP request, combining existing headers with new.

T
ExcludeKeys

ExcludeKeys<T, TKey> is a TypeScript utility type that constructs a new type by excluding properties from the original type T that match the key type TKey.

T
ExcludeKeysByPrefix

ExcludeKeysByPrefix<T, Prefix> is a TypeScript utility type that constructs a new type by excluding properties from the original type T whose key names start with the given Prefix.

f
exists

Determine if a path exists (async).

f
existsSync

Determine if a path exists (sync).

T
ExtractExact

ExtractExact<T, TExtract> is a TypeScript utility type that constructs a new type by extracting from TExtract those types that exactly match T from the union.

T
ExtractKeysByPrefix

ExtractKeysByPrefix<T, Prefix> is a TypeScript utility type that extracts properties from an object type T whose keys start with the given Prefix.

T
FileListRequest

Represents a request for files in a directory based on the given extensions.

T
FluentTagDeepStripIndexSignature

FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata from all properties of an object, including index signatures, while handling both regular and dynamic properties.

f
generateDirectoryHash
No documentation available
f
generateKeyValue

Generates a JSON Web Key (JWK) for the given JWT config.

f
getFilesList

Retrieves a list of files in the specified directory, optionally filtering by extension. Use the meta to give the file list current context.

T
HasIndexSignatures

HasIndexSignatures<T, MatchAll> determines if an object T contains index signatures (such as string, number, or symbol). It returns true if index signatures are present, and false otherwise.

T
HasKeys

HasKeys<T, Prefix> checks if the object T has any keys that start with the given Prefix.

T
HasTypeCheck

HasTypeCheck<T, U, MatchAll> checks if a type T extends U. If MatchAll is true, it checks if all types in a union extend U. If MatchAll is false, it checks if at least one type in a union extends U.

T
IsMatched

IsMatched<Matches, MatchAll> evaluates whether all matches in Matches are true if MatchAll is true, or whether at least one match is true if MatchAll is false.

T
IsNativeType

IsNativeType<T> checks if a given type T is a native JavaScript type. Native types include Date, Promise, Map, Set, and others.

T
IsNotUndefined

IsNotUndefined<T> checks whether a given type T is not strictly undefined.

T
IsObject

IsObject<T> checks if a given type T is an object that is not an array. It excludes null, undefined, arrays, and any types by first removing null and undefined using NonNullable.

T
IsObjectNotNative
No documentation available
f
isPromise
No documentation available
T
IsRecord

IsRecord<T> checks if a given type T is a record-like object. It evaluates to true if:

f
isStatusSuccess

Check to see if a status is successful (code 0).

T
IsUndefined

IsUndefined<T> is a utility type that determines if a type T is undefined or can possibly be undefined. It covers scenarios where T is explicitly undefined, includes undefined in a union, or is an optional type.

T
IsUnion

Checks if a given type T is a union type.

f
jsonMapSetClone

Clones a value with Map/Set replacer and reviver applied.

f
jsonMapSetParse

Parses a JSON string into a value with Map/Set reviver applied.

f
jsonMapSetReplacer

Replacer function for Map/Set parsing.

f
jsonMapSetReviver

Reviver function for Map/Set parsing.

f
jsonMapSetStringify

Stringifies a value with Map/Set replacer applied.

T
KnownMethod
No documentation available
v
knownMethods
No documentation available
f
loadJwtConfig

Loads JWT configuration from environment variables.

f
logNewJWK
No documentation available
T
MatchSwitch

MatchSwitch<Condition, Matched, NotMatched, MatchAll> evaluates the provided Condition. It breaks down unions in Condition using infer U, and then checks if all or any types match using the IsMatched type.

f
merge

Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be replaced with the new array.

f
mergeWithArrays

Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be merged the new array.

T
NoPropertiesUndefined

NoPropertiesUndefined<T> is a TypeScript utility type that recursively removes undefined and null from all properties and sub-properties of an object type T.

T
NormalizeNever

NormalizeNever<T, Replacement> converts never to Replacement, but leaves all other types unchanged. It works for unions, intersections, and single types.

T
NullableArrayOrObject

NullableArrayOrObject is a utility type that recursively makes all properties of a given type T nullable if they are arrays or objects.

f
outerSlice

Create a new array by slicing from the start and end of the input array. Ensures no duplicate items are included even if slices overlap.

c
Pageable

Basic structure for pageable results.

f
processCacheControlHeaders

Processes cache control headers on a response.

f
proxyRequest

Proxies the request to a remote server.

c
Queue

This is a simple implementation of a queue data structure.

f
redirectRequest

Redirects the request to a new location with the specified status code.

T
RemoveIndexSignatures

RemoveIndexSignatures<T> is a TypeScript utility type that constructs a new type by removing index signatures (string, number, and symbol) from the original type T.

T
ResolveIndexSignatures

ResolveIndexSignatures<T> is a TypeScript utility type that constructs a new type by resolving and retaining any index signatures from the original type T, while excluding explicitly defined keys.

f
resolvePackageRoot
No documentation available
f
runTest

runTest<TResult, TExpected> is a generic test helper function designed to verify type assertions and runtime equality in TypeScript. It takes in a result and expected value, ensuring that the types match at compile-time and values match at runtime.

c
Stack

This is a simple implementation of a stack data structure.

T
Status

The status is a common object for passing more details back than standard boolean.

T
tagCheck
No documentation available
T
UnionToIntersection
No documentation available
T
ValueType

ValueType<T> extracts the value type of a Record type. If the input type T is not a record, the type will resolve to never.

build

Helpers for working with Deno and build processes.

I
DenoConfig

This is the schema for the Deno configuration file.

f
loadDenoConfig

Loads the deno configuration file and returns the DenoConfig object.

f
loadDenoConfigSync

Loads the deno configuration file synchronously and returns the DenoConfig object.

f
loadRefArchMetaUrl

Use to load the full path relative to the reference architecture module.

f
resolvePath

Resolves a path using the provided resolver function.

c
SetVersion

SetVersion provides an interface for setting the version of a Deno project.

build/version

Entry point for the version management script.

v
version

The version that was used to configure the deno file.

cli

Helpers for delivering quality, interactive CLI experiences.

f
appendStyles
No documentation available
v
ArcSpinner
No documentation available
f
buildTextContent
No documentation available
f
captureLogs
No documentation available
f
clearLine

Clears the line and performs a carriage return

c
CLICommandExecutor

CLICommandExecutor is the runtime orchestrator that prepares and runs a single command — handling logging, params, services, and lifecycle phases (Init, Run, DryRun, Cleanup).

I
CLICommandExecutorOptions

Options provided when executing a CLI command. These are derived during the parsing + resolution phase.

c
CLICommandInvocationParser
No documentation available
c
CLICommandMatcher
No documentation available
T
CLIConfig

Represents the structure of the root CLI configuration (.cli.json). This governs the CLI’s identity, entry tokens, command structure, and versioning.

T
v
CLIConfigSchema

Inferred runtime type from CLIConfigSchema. Matches the validated structure used throughout the CLI engine.

c
CLIHelpBuilder
No documentation available
T
CLIInitFn

Defines the shape of a CLI-wide initialization hook. Called once before command resolution.

T
CLIOptions
No documentation available
f
Command
No documentation available
T
CommandContext

CommandContext defines the full execution context passed to each command lifecycle method (Init, Run, DryRun, and Cleanup). It includes schemas, CLI config, command metadata, resolved runtime parameters, logging tools, service instances, and optional subcommands.

T
v
CommandContextSchema

Runtime-typed version of CommandContext for validation, help, and introspection.

T
CommandContextSubset
No documentation available
f
CommandIntent
No documentation available
f
CommandIntents
No documentation available
T
CommandInvokerMap

A map of command invocation functions. Each key represents a subcommand, and each value is a function that executes that subcommand with named flags and optional positional args.

T
CommandMatch
No documentation available
T
CommandModule

Represents a complete, executable CLI command module. Includes runtime class, schemas for validation and docs, and metadata for help.

T
CommandModuleMetadata

Represents the metadata for a single CLI command module. This metadata includes the command's name, description, usage, and examples.

T
v
CommandModuleMetadataSchema

Type inferred from the CommandModuleMetadataSchema, providing type safety when working with command metadata in the application.

T
CommandParamConstructor

Strongly typed constructor for a CommandParams subclass.

c
CommandParams

Base class for all CLI command parameter sets. Provides typed access to raw flags and args, plus standard dry-run support.

c
CommandRuntime

Abstract base class for all CLI commands. Supports both fluent-built and class-authored modules via a shared lifecycle contract.

T
CommandSuggestions
No documentation available
f
createTestCLI
No documentation available
f
defineCommandModule

Strongly typed helper to define a CLI CommandModule cleanly. Ensures full type inference for flags, args, and param classes.

v
DotsSpinner
No documentation available
c
EmbeddedTemplateLocator

TemplateLocator implementation that reads from a preloaded in-memory map. Typically used in statically compiled CLI binaries.

f
emitSchema

Emits a given Zod schema as a JSON Schema to the schemas/ directory.

T
ExtractInvokerMap
No documentation available
v
HelpArgsSchema

HelpCommand takes no positional arguments.

c
HelpCommand

Runtime implementation of the help renderer.

c
HelpCommandParams

Parameters used by HelpCommand — surfaces structured HelpContext flags.

T
HelpContext

Represents the structured context used by the HelpCommand to dynamically render help output for the CLI.

T
v
HelpContextSchema

Inferred runtime type from HelpContextSchema. Matches the validated structure of CLI help flags.

v
HelpFlagsSchema

Flag schema for HelpCommand — directly matches the HelpContext structure.

f
hideCursor

Hides the terminal cursor

f
importModule

Dynamically imports a module from a DFS. If compiled, bundles .ts files to JS via deno bundle and loads via Blob URL.

T
RGB24StyleKeys
No documentation available
T
RGB8StyleKeys
No documentation available
T
RGBStyleKeys
No documentation available
T
RGBStyleOptions
No documentation available
f
runCommandWithLogs
No documentation available
f
runWithPassthroughLogs
No documentation available
f
showCursor

Shows the terminal cursor

T
Spinner
No documentation available
T
StyleKeys
No documentation available
T
StyleOptions

The collection of available color effects that can be applied to text.

c
TemplateLocator
No documentation available
c
TemplateScaffolder
No documentation available
T
TextContent
No documentation available
v
WindowsSpinner
No documentation available

deno-kv

Helpers for interacting with and managing Deno KV.

T
AtomicOperationHandler

Used for chaining atomic operations.

T
DenoKVNonce

A nonce object containing a unique nonce and an optional versionstamp.

f
enqueueAtomic

Enqueues an atomic operation and returns the result.

f
enqueueAtomicOperation

Enqueues an atomic operation with a nonce and optional delay.

f
hasKvEntry

Determine if a key exists in a Deno.Kv instance.

f
initializeDenoKv

Initialize Deno.Kv instance.

f
listenQueueAtomic

Listen for a message in the queue and apply the atomic operation handler.

c
DFSFileHandler

Abstract base class implementing IDFSFileHandler. Concrete implementations must provide method implementations.

f
getFileCheckPathsToProcess
No documentation available
I
IDFSFileHandler

Interface defining methods for a Distributed File System (DFS) File Handler.

c
LocalDFSFileHandler

Implements DFSFileHandler for local file system storage.

T
LocalDFSFileHandlerDetails

Represents details for a Local File System-backed Distributed File System (DFS) in Everything as Code (EaC).

fluent

The Fluent SDK for use in easily generating fluent style management of types.

T
$FluentTag

$FluentTag<TType, TTag, TData, TValues> is used to apply Fluent tagging metadata to types, enforcing Fluent type inference controls. This type allows you to attach both primary and additional metadata values (TValues) based on TData.

T
$FluentTagDataKeyOptions

$FluentTagDataKeyOptions<TType> maps the provided tag type to its corresponding key options.

T
$FluentTagDataValueTypesOptions

$FluentTagDataValueTypesOptions<TType, TData> maps the provided tag type and data key to its corresponding value type.

T
$FluentTagDeepStrip

$FluentTagDeepStrip<T, TType, TTag> is a utility type that recursively removes $FluentTag metadata from the entire type tree, delegating the operation to $TagDeepStrip.

T
$FluentTagExists

$FluentTagExists<T, TType, TTag, TData> checks if a $FluentTag exists within a type T.

T
$FluentTagExtract

$FluentTagExtract<T, TType> extracts the tag value from a $FluentTag type T based on the specified TType, utilizing the $TagExtract utility for extraction.

T
$FluentTagExtractDataKeys

$FluentTagExtractDataKeys<T, TType> extracts all the data keys from a $FluentTag based on the tag type TType.

T
$FluentTagExtractValue

$FluentTagExtractValue<T, TType, TData> extracts the tag data value from a $FluentTag type T based on a tag type TType and a specific tag data key TData.

T
$FluentTagExtractValueAndStrip

$FluentTagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $FluentTag type T and returns the result alongside the stripped version of the type T (without the tag metadata).

T
$FluentTagExtractValues

$FluentTagExtractValues<T, TType, TData> extracts all tag data values from a $FluentTag type T in a nested structure, based on the tag type TType and tag data TData.

T
$FluentTagLoadHandlers

$FluentTagLoadHandlers<T[K]> extracts the handlers from a $FluentTag on the T[K] property, if they exist, or returns an empty object if not.

T
$FluentTagMethodsDataKeyOptions

$FluentTagMethodsDataKeyOptions provides specific key options for "Methods" tag type.

T
$FluentTagMethodsOptions

$FluentTagMethodsOptions provides specific options for the "Methods" tag type.

T
$FluentTagOptions

$FluentTagOptions<TTagType> maps the provided tag type to its corresponding tag options.

T
$FluentTagStrip

$FluentTagStrip<T, TType, TTag, TData, TExact> removes $FluentTag metadata from a property.

T
$FluentTagTypeOptions

$FluentTagTypeOptions defines the available tag type options for Fluent tagging.

T
DefaultFluentMethods

The default Fluent Methods type.

T
DetermineDefaultFluentMethodsType

DetermineDefaultFluentMethodsType<T, K> determines the appropriate default method type for a given object property based on the type of the property and its value.

T
DetermineDefaultFluentMethodsType2
No documentation available
T
DetermineDefaultNonObjectFluentMethodsType
No documentation available
T
T
DetermineDefaultNonRecordFluentMethodsType
No documentation available
T
T
DetermineDefaultObjectFluentMethodsType
No documentation available
T
DetermineDefaultObjectFluentMethodsType2
No documentation available
T
DetermineDefaultRecordFluentMethodsType
No documentation available
T
DetermineDefaultRecordFluentMethodsType2
No documentation available
T
DetermineEaCFluentMethods
No documentation available
T
DetermineFluentMethodsType

DetermineFluentMethodsType<T, K> determines the Fluent Methods type by checking if a FluentTag has been assigned to the property T[K]. If a FluentTag exists, it returns the extracted value for the Methods tag. If no tag exists, it falls back to a default type based on the shape of T[K] using DetermineDefaultFluentMethodsType.

T
DetermineFluentMethodsType2
No documentation available
T
ExtractFluentBuilderModel
No documentation available
c
FluentBuilder

A dynamic, Proxy based, Fluent API builder. It handles all of the data management when using the Fluent API methods. Supports defining custom handlers to invoke in varying scopes.

f
fluentBuilder
No documentation available
T
FluentBuilderMethodsHandlers

FluentBuilderMethodsHandlers extracts and enforces strong typing for handler functions from a $FluentTagDataValueTypesOptions<"Methods", "handlers"> tag.

T
FluentBuilderRoot
No documentation available
T
FluentMethodsMap

A default mapping of method types to their corresponding methods type.

T
FluentMethodsObject

Used for managing the property as an object, returning a fluent API for each of it's properties.

T
FluentMethodsObjectReturnType
No documentation available
T
FluentMethodsProperty

Used for managing the property as it's value type.

T
FluentMethodsPropertyReturnType
No documentation available
T
FluentMethodsRecord

Used for managing the property as an object, returning a fluent API for each of it's properties.

T
FluentMethodsRecordReturnType
No documentation available
T
SelectFluentBuilder

Used to Select the Fluent builder type to use.

T
SelectFluentMethods

SelectFluentMethods<T, TBuilderModel> processes a type T and selects the appropriate Fluent methods based on the type of the properties.

http

Helpers to assist with HTTP operations.

f
buildURLMatch
No documentation available
f
computeBaseHref
No documentation available
f
establishHeaders

Establishes headers for an HTTP request, combining existing headers with new.

T
KnownMethod
No documentation available
v
knownMethods
No documentation available
f
processCacheControlHeaders

Processes cache control headers on a response.

f
proxyRequest

Proxies the request to a remote server.

f
redirectRequest

Redirects the request to a new location with the specified status code.

iterables

Helpers to assist with iterable operations and management.

f
concatUint8Arrays

Concatenate two Uint8Array objects into a new Uint8Array object.

f
convertAsyncIterable

Convert an async iterable to an async iterable of another type.

f
jsonMapSetClone

Clones a value with Map/Set replacer and reviver applied.

f
jsonMapSetParse

Parses a JSON string into a value with Map/Set reviver applied.

f
jsonMapSetReplacer

Replacer function for Map/Set parsing.

f
jsonMapSetReviver

Reviver function for Map/Set parsing.

f
jsonMapSetStringify

Stringifies a value with Map/Set replacer applied.

f
outerSlice

Create a new array by slicing from the start and end of the input array. Ensures no duplicate items are included even if slices overlap.

c
Queue

This is a simple implementation of a queue data structure.

c
Stack

This is a simple implementation of a stack data structure.

iterables/json-map-set

JSON serialization functions for Map/Set cloning.

f
jsonMapSetClone

Clones a value with Map/Set replacer and reviver applied.

f
jsonMapSetParse

Parses a JSON string into a value with Map/Set reviver applied.

f
jsonMapSetReplacer

Replacer function for Map/Set parsing.

f
jsonMapSetReviver

Reviver function for Map/Set parsing.

f
jsonMapSetStringify

Stringifies a value with Map/Set replacer applied.

jwt

Helpers for interacting with and managing JWTs.

N
djwt
No documentation available
f
generateKeyValue

Generates a JSON Web Key (JWK) for the given JWT config.

f
loadJwtConfig

Loads JWT configuration from environment variables.

f
logNewJWK
No documentation available
f
getPackageLogger
No documentation available
f
getPackageLoggerSync
No documentation available
c
f
findClosestMatch

Finds the closest fuzzy match using Levenshtein distance.

f
levenshtein

Levenshtein distance — classic edit-distance algorithm.

merge

Helper functions for deep merging objects.

f
merge

Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be replaced with the new array.

f
mergeWithArrays

Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be merged the new array.

oauth

Helpers to support working OAuth in Deno with DenoKV.

f
creatAzureADB2COAuthConfig

Creates an Azure AD B2C OAuth2 client configuration.

f
createAzureADOAuth

Creates an OAuth helpers object for Azure AD OAuth.

f
createAzureADOAuthConfig

Creates an Azure AD OAuth2 client configuration.

f
createGitHubOAuth

Creates an OAuth helpers object for GitHub OAuth.

f
createGitHubOAuthConfig

Creates a GitHub OAuth2 client configuration.

f
createOAuthHelpers

Creates an OAuth helpers object.

f
creatOAuthConfig

Creates an OAuth2 client configuration.

f
oAuthRequest

The OAuth request handler.

T
UserOAuthConnection

User OAuth connection object representing the user's OAuth token.

f
userOAuthConnExpired

Checks if the user's OAuth connection is expired.

path

Helper functions to assist with file paths and directories.

f
createIfNotExists

Creates a directory if it doesn't exist (async). If the directory already exists, no action is taken.

f
createIfNotExistsSync

Creates a directory if it doesn't exist (sync). If the directory already exists, no action is taken.

f
exists

Determine if a path exists (async).

f
existsSync

Determine if a path exists (sync).

T
FileListRequest

Represents a request for files in a directory based on the given extensions.

f
generateDirectoryHash
No documentation available
f
getFilesList

Retrieves a list of files in the specified directory, optionally filtering by extension. Use the meta to give the file list current context.

f
resolvePackageRoot
No documentation available
T
$Tag

$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference. The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol. If the TTag type is never or undefined, the tag is omitted.

T
$TagDeepStrip

$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.

T
$TagDeepStripArray

$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.

T
$TagDeepStripObject

$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.

T
$TagDeepStripTuple

$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.

T
$TagExists

$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T. The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.

T
$TagExtract

$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.

T
$TagExtractDataKeys

Extracts all data keys from a $Tag based on a tag type TType.

T
$TagExtractValue

$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T based on a tag type TType and tag data TData.

T
$TagExtractValueAndStrip

$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it along with the stripped version of the type.

T
$TagExtractValues

$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T in a nested structure, based on tag type TType and tag data TData.

T
$TagStrip

$TagStrip<T, TType, TTag, TData, TExact> removes tag metadata from a property.

T
$TagValues

$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata values during type inference. It allows attaching multiple key-value pairs (TValues) alongside the primary tag.

T
FluentTagDeepStripIndexSignature

FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata from all properties of an object, including index signatures, while handling both regular and dynamic properties.

T
tagCheck
No documentation available

types

Helper types used by the Fathym systems.

T
$Tag

$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference. The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol. If the TTag type is never or undefined, the tag is omitted.

T
$TagDeepStrip

$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.

T
$TagDeepStripArray

$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.

T
$TagDeepStripObject

$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.

T
$TagDeepStripTuple

$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.

T
$TagExists

$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T. The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.

T
$TagExtract

$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.

T
$TagExtractDataKeys

Extracts all data keys from a $Tag based on a tag type TType.

T
$TagExtractValue

$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T based on a tag type TType and tag data TData.

T
$TagExtractValueAndStrip

$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it along with the stripped version of the type.

T
$TagExtractValues

$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T in a nested structure, based on tag type TType and tag data TData.

T
$TagStrip

$TagStrip<T, TType, TTag, TData, TExact> removes tag metadata from a property.

T
$TagValues

$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata values during type inference. It allows attaching multiple key-value pairs (TValues) alongside the primary tag.

T
AssertEquals
No documentation available
T
ExcludeKeys

ExcludeKeys<T, TKey> is a TypeScript utility type that constructs a new type by excluding properties from the original type T that match the key type TKey.

T
ExcludeKeysByPrefix

ExcludeKeysByPrefix<T, Prefix> is a TypeScript utility type that constructs a new type by excluding properties from the original type T whose key names start with the given Prefix.

T
ExtractExact

ExtractExact<T, TExtract> is a TypeScript utility type that constructs a new type by extracting from TExtract those types that exactly match T from the union.

T
ExtractKeysByPrefix

ExtractKeysByPrefix<T, Prefix> is a TypeScript utility type that extracts properties from an object type T whose keys start with the given Prefix.

T
FluentTagDeepStripIndexSignature

FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata from all properties of an object, including index signatures, while handling both regular and dynamic properties.

T
HasIndexSignatures

HasIndexSignatures<T, MatchAll> determines if an object T contains index signatures (such as string, number, or symbol). It returns true if index signatures are present, and false otherwise.

T
HasKeys

HasKeys<T, Prefix> checks if the object T has any keys that start with the given Prefix.

T
HasTypeCheck

HasTypeCheck<T, U, MatchAll> checks if a type T extends U. If MatchAll is true, it checks if all types in a union extend U. If MatchAll is false, it checks if at least one type in a union extends U.

T
IsMatched

IsMatched<Matches, MatchAll> evaluates whether all matches in Matches are true if MatchAll is true, or whether at least one match is true if MatchAll is false.

T
IsNativeType

IsNativeType<T> checks if a given type T is a native JavaScript type. Native types include Date, Promise, Map, Set, and others.

T
IsNotUndefined

IsNotUndefined<T> checks whether a given type T is not strictly undefined.

T
IsObject

IsObject<T> checks if a given type T is an object that is not an array. It excludes null, undefined, arrays, and any types by first removing null and undefined using NonNullable.

T
IsObjectNotNative
No documentation available
f
isPromise
No documentation available
T
IsRecord

IsRecord<T> checks if a given type T is a record-like object. It evaluates to true if:

T
IsUndefined

IsUndefined<T> is a utility type that determines if a type T is undefined or can possibly be undefined. It covers scenarios where T is explicitly undefined, includes undefined in a union, or is an optional type.

T
IsUnion

Checks if a given type T is a union type.

T
MatchSwitch

MatchSwitch<Condition, Matched, NotMatched, MatchAll> evaluates the provided Condition. It breaks down unions in Condition using infer U, and then checks if all or any types match using the IsMatched type.

T
NoPropertiesUndefined

NoPropertiesUndefined<T> is a TypeScript utility type that recursively removes undefined and null from all properties and sub-properties of an object type T.

T
NormalizeNever

NormalizeNever<T, Replacement> converts never to Replacement, but leaves all other types unchanged. It works for unions, intersections, and single types.

T
NullableArrayOrObject

NullableArrayOrObject is a utility type that recursively makes all properties of a given type T nullable if they are arrays or objects.

T
RemoveIndexSignatures

RemoveIndexSignatures<T> is a TypeScript utility type that constructs a new type by removing index signatures (string, number, and symbol) from the original type T.

T
ResolveIndexSignatures

ResolveIndexSignatures<T> is a TypeScript utility type that constructs a new type by resolving and retaining any index signatures from the original type T, while excluding explicitly defined keys.

f
runTest

runTest<TResult, TExpected> is a generic test helper function designed to verify type assertions and runtime equality in TypeScript. It takes in a result and expected value, ensuring that the types match at compile-time and values match at runtime.

T
tagCheck
No documentation available
T
UnionToIntersection
No documentation available
T
ValueType

ValueType<T> extracts the value type of a Record type. If the input type T is not a record, the type will resolve to never.

f
correlateResult
No documentation available
T
FathymWorkerConfig
No documentation available
T
T
FathymWorkerMessageHandler
No documentation available
T
PromisifyProperties
No documentation available
f
waitForCorrelation
No documentation available
f
waitForCorrelationSync
No documentation available
f
waitForPing
No documentation available

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.