use fnType everywhere to create function types
This commit is contained in:
parent
a8260f2afb
commit
6023efc295
10 changed files with 33 additions and 27 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue