@prismshadow/penguin-core/kernel · Manifest & Static Verification

assignable

function low-level
Source ↗
IMPORT import { assignable } from "@prismshadow/penguin-core/kernel";

Function subtyping: have can stand in for want when it takes no more parameters than a caller of want passes, each of its parameters accepts what the caller passes (contravariant), and what it returns is what the caller expects (covariant).

Declaration

export function assignable(
  have: Sig,
  want: Sig,
  table: TableLike = {},
  seen: Set<string> = new Set(),
): string[]

Parameters & Return

have

Sig

want

Sig

table?

TableLike
default{}

seen?

Set<string>
defaultnew Set()

@returns

string[]