use fnType everywhere to create function types

This commit is contained in:
Joeri Exelmans 2025-03-14 17:05:04 +01:00
parent a8260f2afb
commit 6023efc295
10 changed files with 33 additions and 27 deletions

View file

@ -2,7 +2,7 @@ import { DefaultMap } from "./util.js";
const mapping = new DefaultMap(() => new Map());
export const getFnType = (inType, outType) => {
export const fnType = ({in: inType, out: outType}) => {
const m2 = mapping.getdefault(inType);
if (m2.has(outType)) {
return m2.get(outType);