Skip to content

LiveExampleTarget

type LiveExampleTarget =
    | JavaScript
    | TypeScript
    | Python
    | Rust
    | Dart
    | Php
    | Erlang
AssemblyNacara.Plugin.LiveExample

What Fable compiles a snippet to.

Only JavaScript runs. The rest are compiled and shown: the console carries what the compiler said, and the output tab carries the code it emitted.

A language the compiler does not know fails the build rather than reaching a reader.

Declared inside

DescriptionEverything known about a target, in one place so nothing drifts

Cases

JavaScript
TypeScript
Python
Rust
Dart
Php
Erlang

Functions and values

all: LiveExampleTarget list

Every target, in the order they are worth reading.

description (target: LiveExampleTarget) : Description

What this target is called and what it can do.

Parameter
targetThe target.
languages: string list

The grammar name each target's output is coloured with.

spellings: string list

Every spelling a fence may write, for saying what was expected.

tryParse (name: string) : LiveExampleTarget option

The target a fence named, if it named one that exists.

Parameter
nameWhat was written after target=.

Properties

member IsDart: bool
member IsErlang: bool
member IsJavaScript: bool
member IsPhp: bool
member IsPython: bool
member IsRust: bool
member IsTypeScript: bool