Spec Module
The facts and mappings every shaping pass is written against: what a resolved type *is* (literal, tuple, callback, branded primitive, constructor object, tagged union), the F# reference it maps to, its declared type parameters, and shared member and signature shaping.
Functions and values
| Function or value |
Description
|
|
How a harvested value binds in JavaScript. An ambient global is already on `globalThis`, so
it takes `[
|
|
The fallback name for a default export - `Naming.defaultExport` over the entry package.
|
Full Usage:
fsName fallback export
Parameters:
string
export : HarvestedExport
Returns: string
|
The F# name a harvested export generates under: the exported name; a default export takes its declaring symbol's name - except `export default function name` binds the symbol itself as `default`, which falls back to the package-derived name.
|
|
|
|
|
Full Usage:
typeRef ctx model self owner typeId
Parameters:
Context
model : ShapeModel
self : string option
owner : string
typeId : int
Returns: FsTypeRef * Finding list
|
The F# type written at a reference position, with the findings any widening produces. `self` is the name of the declaration being shaped, so a polymorphic `this` return resolves to it. A type carries several flags at once, so the arm order below picks which finding.
|
Full Usage:
uniqueCaseNames names
Parameters:
string list
Returns: string list
|
Case names must be unique within one DU; a later duplicate takes a numeric suffix in member order, deterministically.
|