Skip to content

TypedTransformer<Source, Transformed>

A transformer that can transform and restore a specific type.

Import:

import { TypedTransformer } from 'obsidian-dev-utils/transformers/typed-transformer';

Signature:

export class TypedTransformer<Source, Transformed> extends Transformer

Extends: Transformer

Methods

MethodReturnsDescription
canTransform(value, key)value is SourceDetermines if the transformer can transform the given value.
getTransformer(transformerId)TransformerGets the transformer with the given id.
(Inherited from Transformer)
getTransformerId(value, key)null | stringGets the id of the transformer that can transform the given value.
(Inherited from Transformer)
restoreValue(transformedValue, key)SourceRestores the given value.
restoreValue(transformedValue, key)unknownRestores the given value.
(Inherited from Transformer)
transformObjectRecursively(value)GenericObjectTransforms the given object recursively.
(Inherited from Transformer)
transformValue(value, key)TransformedTransforms the given value.
transformValue(value, key)unknownTransforms the given value.
(Inherited from Transformer)

Links to this page: