elmish


1: 
namespace Elmish

Log

Basic cross-platform logging API.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
module internal Log =

#if FABLE_COMPILER
    open Fable.Core.JS

    let onError (text: string, ex: exn) = console.error (text,ex)
    let toConsole(text: string, o: #obj) = console.log(text,o)

#else
#if NETSTANDARD2_0
    let onError (text: string, ex: exn) = System.Diagnostics.Trace.TraceError("{0}: {1}", text, ex)
    let toConsole(text: string, o: #obj) = printfn "%s: %A" text o
#else
    let onError (text: string, ex: exn) = System.Console.Error.WriteLine("{0}: {1}", text, ex)
    let toConsole(text: string, o: #obj) = printfn "%s: %A" text o
#endif
#endif

#if FABLE_COMPILER
module internal Timer =
    open System.Timers
    let delay interval callback =
        let t = new Timer(float interval, AutoReset = false)
        t.Elapsed.Add callback
        t.Enabled <- true
        t.Start()
#endif
val internal onError : text:string * ex:exn -> unit
val text : string
Multiple items
val string : value:'T -> string

--------------------
type string = System.String
val ex : exn
type exn = System.Exception
namespace System
type Console =
  static member BackgroundColor : ConsoleColor with get, set
  static member Beep : unit -> unit + 1 overload
  static member BufferHeight : int with get, set
  static member BufferWidth : int with get, set
  static member CapsLock : bool
  static member Clear : unit -> unit
  static member CursorLeft : int with get, set
  static member CursorSize : int with get, set
  static member CursorTop : int with get, set
  static member CursorVisible : bool with get, set
  ...
property System.Console.Error: System.IO.TextWriter
System.IO.TextWriter.WriteLine() : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: obj) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: string) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: decimal) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: float) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: float32) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: uint64) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: int64) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: uint32) : unit
   (+0 other overloads)
System.IO.TextWriter.WriteLine(value: int) : unit
   (+0 other overloads)
val internal toConsole : text:string * o:'a -> unit
val o : 'a
type obj = System.Object
val printfn : format:Printf.TextWriterFormat<'T> -> 'T