@@ -5,10 +5,120 @@ open Fable.Core
55
66// fsharplint:disable MemberNames,InterfaceNames
77
8- type Builtins =
9- abstract print : obj : obj -> unit
8+ type TextIOBase =
9+ abstract read : unit -> string
10+ abstract read : __size : int -> string
11+
12+ type TextIOWrapper =
13+ inherit TextIOBase
14+
15+ [<StringEnum>]
16+ type OpenTextModeUpdating =
17+ | [<CompiledName( " r+" ) >] ReadUpdate
18+ | [<CompiledName( " +r" ) >] UpdateRead
19+ | [<CompiledName( " rt+" ) >] ReadTextUpdate
20+ | [<CompiledName( " r+t" ) >] ReadUpdateText
21+ | [<CompiledName( " +rt" ) >] UpdateReadText
22+ | [<CompiledName( " tr+" ) >] TextReadUpdate
23+ | [<CompiledName( " t+r" ) >] TextUpdateRead
24+ | [<CompiledName( " +tr" ) >] UpdateTextRead
25+ | [<CompiledName( " w+" ) >] WriteUpdate
26+ | [<CompiledName( " +w" ) >] UpdateWrite
27+ | [<CompiledName( " wt+" ) >] WriteTextUpdate
28+ | [<CompiledName( " w+t" ) >] WriteUpdateText
29+ | [<CompiledName( " +wt" ) >] UpdateWriteText
30+ | [<CompiledName( " tw+" ) >] TextWriteUpdate
31+ | [<CompiledName( " t+w" ) >] TextUpdateWrite
32+ | [<CompiledName( " +tw" ) >] UpdateTextWrite
33+ | [<CompiledName( " a+" ) >] AppendUpdate
34+ | [<CompiledName( " +a" ) >] UpdateAppend
35+ | [<CompiledName( " at+" ) >] AppendTextUpdate
36+ | [<CompiledName( " a+t" ) >] AppendUpdateText
37+ | [<CompiledName( " +at" ) >] UpdateAppendText
38+ | [<CompiledName( " ta+" ) >] TextAppendUpdate
39+ | [<CompiledName( " t+a" ) >] TextUpdateAppend
40+ | [<CompiledName( " +ta" ) >] UpdateTextAppend
41+ | [<CompiledName( " x+" ) >] CreateUpdate
42+ | [<CompiledName( " +x" ) >] UpdateCreate
43+ | [<CompiledName( " xt+" ) >] CreateTextUpdate
44+ | [<CompiledName( " x+t" ) >] CreateUpdateText
45+ | [<CompiledName( " +xt" ) >] UpdateCreateText
46+ | [<CompiledName( " tx+" ) >] TextCreateUpdate
47+ | [<CompiledName( " t+x" ) >] TextUpdateCreate
48+ | [<CompiledName( " +tx" ) >] UpdateTextCreate
49+
50+ [<StringEnum>]
51+ type OpenTextModeReading =
52+ | [<CompiledName( " rt" ) >] Read
53+ | [<CompiledName( " rt" ) >] ReadText
54+ | [<CompiledName( " tr" ) >] TextRead
55+
56+ [<StringEnum>]
57+ type OpenTextModeWriting =
58+ | [<CompiledName( " w" ) >] Write
59+ | [<CompiledName( " wt" ) >] WriteText
60+ | [<CompiledName( " tw" ) >] TextWrite
61+ | [<CompiledName( " a" ) >] Append
62+ | [<CompiledName( " at" ) >] AppendText
63+ | [<CompiledName( " ta" ) >] TextAppend
64+ | [<CompiledName( " x" ) >] Create
65+ | [<CompiledName( " xt" ) >] CreateText
66+ | [<CompiledName( " tx" ) >] TextCreate
67+
68+ [<Erase>]
69+ type OpenTextMode =
70+ | OpenTextModeUpdating
71+ | OpenTextModeWriting
72+ | OpenTextModeReading
73+
74+
75+ [<Erase>]
76+ type _OpenFile =
77+ | StrOrBytesPath of string
78+ | FileDescriptor of int
79+
80+ type IExports =
81+ /// Return the absolute value of the argument.
82+ abstract abs : int -> int
83+ /// Return the absolute value of the argument.
84+ abstract abs : float -> float
85+ /// Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
86+ abstract chr : int -> char
87+ /// Return the names in the current scope.
88+ abstract dir : unit -> string list
89+ /// Return an alphabetized list of names comprising (some of) the
90+ /// attributes of the given object, and of attributes reachable from
91+ /// it
92+ abstract dir : obj -> string list
93+ /// Return the identity of an object.
94+ abstract id : obj -> int
95+ ///Return the length (the number of items) of an object. The argument may
96+ ///be a sequence (such as a string, bytes, tuple, list, or range) or a
97+ ///collection (such as a dictionary, set, or frozen set).
98+ abstract len : obj -> int
99+ /// Make an iterator that computes the function using arguments from
100+ /// the iterable. Stops when iterable is exhausted.
10101 abstract map : ( 'T1 -> 'T2 ) * IEnumerable < 'T1 > -> IEnumerable < 'T2 >
102+ /// Make an iterator that computes the function using arguments from each
103+ /// of the iterables. Stops when the shortest iterable is exhausted.
11104 abstract map : ( 'T1 * 'T2 -> 'T3 ) * IEnumerable < 'T1 > * IEnumerable < 'T2 > -> IEnumerable < 'T3 >
105+ /// Make an iterator that computes the function using arguments from each
106+ /// of the iterables. Stops when the shortest iterable is exhausted.
12107 abstract map : ( 'T1 * 'T2 * 'T3 -> 'T4 ) * IEnumerable < 'T1 > * IEnumerable < 'T2 > * IEnumerable < 'T3 > -> IEnumerable < 'T4 >
108+ /// Return the Unicode code point for a one-character string.
109+ abstract ord : char -> int
110+ abstract print : obj : obj -> unit
111+ abstract read : file : _OpenFile -> TextIOWrapper
112+ abstract read : file : _OpenFile * mode : OpenTextMode -> TextIOWrapper
113+ abstract read : file : _OpenFile * mode : OpenTextMode * buffering : int -> TextIOWrapper
114+ abstract read : file : _OpenFile * mode : OpenTextMode * buffering : int * encoding : string -> TextIOWrapper
115+
116+ abstract read :
117+ file: _ OpenFile * mode: OpenTextMode * buffering: int * encoding: string * errors: string -> TextIOWrapper
118+
119+ abstract read :
120+ file: _ OpenFile * mode: OpenTextMode * buffering: int * encoding: string * errors: string * newline: string ->
121+ TextIOWrapper
13122
14- let builtins : Builtins = nativeOnly
123+ [<ImportDefault( " builtins" ) >]
124+ let builtins : IExports = nativeOnly
0 commit comments