Logo Xantham

LibBindings Module

The compiler-lib names Fable.Core already binds, and the F# spelling of each. O7 left the compiler-lib group widening to `obj` "until the shipped compiler-lib package exists". For the ECMAScript half of `lib.d.ts` it already does, and every generated file opens it: `Fable.Core.JS` is that package. So `Promise` is `JS.Promise` rather than a bare `obj`, which is one honest loss (the DOM name inside) instead of two. Each entry is the F# name and the arity that name takes. The arity is here rather than inferred because it is the whole safety argument: TypeScript's own lib moves - it made `Uint8Array` generic in a buffer parameter that Fable's abbreviation does not have - and a mapping that guessed would emit code that does not compile. Arities that agree map exactly; a lib type carrying *more* arguments than Fable's binding maps with the extras dropped and a finding; one carrying fewer is not this type at all and widens. The DOM half (`HTMLElement`, `EventTarget`, `Blob`, ...) is not here: it is four hundred names, so it is generated rather than transcribed, and it lives in `BrowserBindings` below. What stays hand-written here is what has a hand-judged loss note attached.

Functions and values

Function or value Description

tryFind name

Full Usage: tryFind name

Parameters:
    name : string

Returns: (string * int * string option) option

The binding for a lib name, if Fable.Core has one: its F# name, its arity, and the loss to record. `seq`-shaped names (`Iterable`, `Iterator`) are absent on purpose - Fable.Core binds only the async ones, and pretending `seq<'T>` interoperates with a JS iterable is exactly the kind of claim this table exists not to make.

name : string
Returns: (string * int * string option) option

Type something to start searching.