Extractor.extract()method
Extract a tree element from the given input.
extract(input: I): O | Promise<O>
new Extractor<I, O>()
| Return | |
|---|---|
Extractor<I, O> | Base class for an extractor that converts an input of type I into a TreeElement output. |
Base class for an extractor that converts an input of type I into a TreeElement output.
TreeElement (or a more specific subtype).class JSONExtractor extends Extractor<string, TreeElement> {
extract(input: string): TreeElement { return JSON.parse(input); }
}Extract a tree element from the given input.
extract(input: I): O | Promise<O>