functionalscript
Version:
FunctionalScript is a purely functional subset of JavaScript
23 lines (22 loc) • 837 B
TypeScript
import { type Vec } from "../types/bit_vec/module.f.ts";
import { type List } from '../types/list/module.f.ts';
export type Block = ItemThunk | ItemArray;
type ItemArray = readonly Item[];
type ItemThunk = () => List<Item>;
export type Item = string | ItemArray | ItemThunk;
export declare const flat: (indent: string) => (text: Block) => List<string>;
/**
* Converts a string to an UTF-8, represented as an MSB first bit vector.
*
* @param s The input string to be converted.
* @returns The resulting UTF-8 bit vector, MSB first.
*/
export declare const msbUtf8: (s: string) => Vec;
/**
* Converts a UTF-8 bit vector with MSB first encoding to a string.
*
* @param msbV - The UTF-8 bit vector with MSB first encoding.
* @returns The resulting string.
*/
export declare const msbUtf8ToString: (msbV: Vec) => string;
export {};