forgot to add new function to index.d.ts
This commit is contained in:
parent
106bd0bfdb
commit
8446f9ba9e
2 changed files with 6 additions and 3 deletions
|
|
@ -187,8 +187,8 @@ export const substitute = (type, substitutions, stack=[]) => {
|
|||
};
|
||||
|
||||
export const assignFn = (funType, paramType) => {
|
||||
const [result] = assignFnSubstitutions(funType, paramType);
|
||||
return result;
|
||||
const [outType] = assignFnSubstitutions(funType, paramType);
|
||||
return outType;
|
||||
};
|
||||
|
||||
// same as above, but also returns the substitutions that took place
|
||||
|
|
@ -202,7 +202,8 @@ export const assignFnSubstitutions = (funType, paramType) => {
|
|||
const {substitutions} = __unify(inType, paramType);
|
||||
// console.log(substitutions, prettyT(outType));
|
||||
const substitutedFnType = substitute(outType, substitutions);
|
||||
return [recomputeTypeVars([substitutedFnType])[0], substitutions];
|
||||
const computedOutType = recomputeTypeVars([substitutedFnType])[0];
|
||||
return [computedOutType, substitutions];
|
||||
}
|
||||
|
||||
// Ensures that no type variables overlap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue