From 1fe40858444cc4d0f9e4ba4223b280aef0ea4fb2 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Mon, 19 May 2025 13:50:03 +0200 Subject: [PATCH] export a bit more --- index.d.ts | 4 ++++ lib/generics/low_level.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 904d28c..67ce8ee 100644 --- a/index.d.ts +++ b/index.d.ts @@ -334,6 +334,10 @@ export function pretty(obj: any): any; export function prettyT(type: any): any; +export function prettyU(unification: any): string; + +export function prettyST(setOfTypes: any): string; + export function prodType(typeParam: any): any; export function recomputeTypeVars(types: any, skip: number): any; diff --git a/lib/generics/low_level.js b/lib/generics/low_level.js index 414e8b9..d313060 100644 --- a/lib/generics/low_level.js +++ b/lib/generics/low_level.js @@ -142,9 +142,9 @@ export const reduceUnification = (unif) => { }; // For debugging -const prettyU = unif => { +export const prettyU = unif => { return `{${[...unif].map(([symbol, types]) => `${getHumanReadableName(symbol)} => ${prettyST(types)}`).join(', ')}}`; }; -const prettyST = st => { +export const prettyST = st => { return `(${st.keys().map(prettyT).join(',')})`; };