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 TransformerExtends: Transformer
Methods
| Method | Returns | Description |
|---|---|---|
| canTransform(value, key) | value is Source | Determines if the transformer can transform the given value. |
| getTransformer(transformerId) | Transformer | Gets the transformer with the given id. (Inherited from Transformer) |
| getTransformerId(value, key) | null | string | Gets the id of the transformer that can transform the given value. (Inherited from Transformer) |
| restoreValue(transformedValue, key) | Source | Restores the given value. |
| restoreValue(transformedValue, key) | unknown | Restores the given value. (Inherited from Transformer) |
| transformObjectRecursively(value) | GenericObject | Transforms the given object recursively. (Inherited from Transformer) |
| transformValue(value, key) | Transformed | Transforms the given value. |
| transformValue(value, key) | unknown | Transforms the given value. (Inherited from Transformer) |
Links to this page: