functionalscript
Version:
FunctionalScript is a purely functional subset of JavaScript
24 lines (23 loc) • 857 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>;
export type Utf8 = Vec;
/**
* 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 utf8: (s: string) => Utf8;
/**
* 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 utf8ToString: (msbV: Utf8) => string;
export {};