UNPKG

@parischap/pretty-print

Version:
68 lines 2.69 kB
/** * Type that is an alias for an array of StringifiedValue's (see StringifiedValue.ts). It represents * the output of the stringification process of the properties of a non-primitive value. */ import { ASText } from '@parischap/ansi-styles'; import { MTypes } from '@parischap/effect-lib'; import * as PPStringifiedValue from './StringifiedValue.js'; /** * Type that represents a StringifiedValues * * @category Models */ export interface Type extends ReadonlyArray<PPStringifiedValue.Type> { } /** * Return a copy of `self` with a mark added at the end of each stringified property except the last * one * * @category Utils */ export declare const addMarkInBetween: (mark: ASText.Type) => MTypes.OneArgFunction<Type>; /** * Return a copy of `self` with `property` added as a single-line StringifiedValue at the start * * @category Utils */ export declare const prependProperty: (property: ASText.Type) => MTypes.OneArgFunction<Type>; /** * Return a copy of `self` with `property` added as a single-line StringifiedValue at the end * * @category Utils */ export declare const appendProperty: (property: ASText.Type) => MTypes.OneArgFunction<Type>; /** * Returns a copy of `self` in which each stringified property has been tabified with `tab` * * @category Utils */ export declare const tabify: (tab: ASText.Type) => MTypes.OneArgFunction<Type>; /** * Returns a copy of `self` in which `treeIndentForFirstLineOfInitProps` has been prepended to the * first line of all properties but the last, `treeIndentForTailsLinesOfInitProps` has been * prepended to all the lines but the first of all properties but the last, * `treeIndentForFirstLineOfLastProp` has been prepended to the first line of the last property, and * `treeIndentForTailLinesOfLastProp` has been prepended to all the lines but the first of last * property. * * @category Utils */ export declare const treeify: ({ treeIndentForFirstLineOfInitProps, treeIndentForTailLinesOfInitProps, treeIndentForFirstLineOfLastProp, treeIndentForTailLinesOfLastProp }: { readonly treeIndentForFirstLineOfInitProps: ASText.Type; readonly treeIndentForTailLinesOfInitProps: ASText.Type; readonly treeIndentForFirstLineOfLastProp: ASText.Type; readonly treeIndentForTailLinesOfLastProp: ASText.Type; }) => MTypes.OneArgFunction<Type>; /** * Returns the length of `self` * * @category Destructors */ export declare const toLength: MTypes.OneArgFunction<Type, number>; /** * Returns the length of the longest property of `self` * * @category Destructors */ export declare const toLongestPropLength: MTypes.OneArgFunction<Type, number>; //# sourceMappingURL=StringifiedProperties.d.ts.map