mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 21:01:10 +00:00
Add d.er
s
Add `d.er`s
This commit is contained in:
parent
a4406e38ef
commit
ddd5bb6660
8 changed files with 80 additions and 0 deletions
4
compiler/erg_compiler/lib/pystd/heapq.d.er
Normal file
4
compiler/erg_compiler/lib/pystd/heapq.d.er
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.heappush!: |T: Type|(heap: Iterable(T), item: T) => NoneType # TODO: Push!
|
||||||
|
.heappop!: |T: Type|(heap: Iterable(T)) => T # TODO: Pop!
|
||||||
|
.heappushpop!: |T: Type|(heap: Iterable(T), item: T) => T # TODO: Push! and Pop!
|
||||||
|
.heapify!: (heap: Array(Obj, _)) => NoneType
|
5
compiler/erg_compiler/lib/pystd/http.d/server.d.er
Normal file
5
compiler/erg_compiler/lib/pystd/http.d/server.d.er
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.HTTPServer: ClassType
|
||||||
|
.ThreadingServer: ClassType
|
||||||
|
.BaseHTTPReqeustHandler: ClassType
|
||||||
|
.SimpleHTTPRequestHandler: ClassType
|
||||||
|
.CGIHTTPRequestHandler: ClassType
|
2
compiler/erg_compiler/lib/pystd/inspect.d.er
Normal file
2
compiler/erg_compiler/lib/pystd/inspect.d.er
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.FrameInfo: ClassType
|
||||||
|
.Traceback: ClassType
|
0
compiler/erg_compiler/lib/pystd/pydoc.d.er
Normal file
0
compiler/erg_compiler/lib/pystd/pydoc.d.er
Normal file
17
compiler/erg_compiler/lib/pystd/socketserver.d.er
Normal file
17
compiler/erg_compiler/lib/pystd/socketserver.d.er
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
.TCPServer: ClassType
|
||||||
|
.UDPServer: ClassType
|
||||||
|
.UnixStreamServer: ClassType
|
||||||
|
.UnixDatagramServer: ClassType
|
||||||
|
|
||||||
|
.ForkingMixIn: ClassType
|
||||||
|
.ThreadingMixIn: ClassType
|
||||||
|
|
||||||
|
.ForkingTCPServer: ClassType
|
||||||
|
.ForkingUDPServer: ClassType
|
||||||
|
.ThreadingTCPServer: ClassType
|
||||||
|
.ThreadingUDPServer: ClassType
|
||||||
|
|
||||||
|
.BaseServer: ClassType
|
||||||
|
.BaseRequestHandler: ClassType
|
||||||
|
.StreamRequestHandler: ClassType
|
||||||
|
.DatagramRequestHandler: ClassType
|
23
compiler/erg_compiler/lib/pystd/threading.d.er
Normal file
23
compiler/erg_compiler/lib/pystd/threading.d.er
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
.Thread!: ClassType
|
||||||
|
.Thread!.name: Str
|
||||||
|
.Thread!.daemon: Bool
|
||||||
|
.Thread!.ident: Nat or NoneType # TODO: Pos or NoneType
|
||||||
|
.Thread!.native_id: Nat or NoneType
|
||||||
|
.Thread!.start!: (self: .Thread!) => NoneType
|
||||||
|
.Thread!.run!: (self: .Thread!) => NoneType
|
||||||
|
.Thread!.join!: (self: .Thread!, timeout := Nat or NoneType) => NoneType
|
||||||
|
.Thread!.is_alive: (self: .Thread!) -> Bool
|
||||||
|
|
||||||
|
.Local! = 'local': ClassType
|
||||||
|
|
||||||
|
.Lock!: ClassType
|
||||||
|
.RLock!: ClassType
|
||||||
|
.Condition!: ClassType
|
||||||
|
.Semaphore!: ClassType
|
||||||
|
.BoundedSemaphore!: ClassType
|
||||||
|
.Event!: ClassType
|
||||||
|
.Timer!: ClassType
|
||||||
|
.Barrier!: ClassType
|
||||||
|
.BrokenBarrierError: ClassType
|
||||||
|
|
||||||
|
.active_count!: () => Nat
|
5
compiler/erg_compiler/lib/pystd/traceback.d.er
Normal file
5
compiler/erg_compiler/lib/pystd/traceback.d.er
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
inspect = pyimport "inspect"
|
||||||
|
|
||||||
|
.print_tb!: (tb: inspect.Traceback, limit := Nat or NoneType, file := File! or NoneType) => NoneType
|
||||||
|
|
||||||
|
.TracebackExeption: ClassType
|
24
compiler/erg_compiler/lib/pystd/types.d.er
Normal file
24
compiler/erg_compiler/lib/pystd/types.d.er
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
.NoneType: ClassType
|
||||||
|
.FunctionType: ClassType
|
||||||
|
.LambdaType: ClassType
|
||||||
|
.GeneratorType: ClassType
|
||||||
|
.CoroutineType: ClassType
|
||||||
|
.AsyncGeneratorType: ClassType
|
||||||
|
.CodeType: ClassType
|
||||||
|
.CellType: ClassType
|
||||||
|
.MethodType: ClassType
|
||||||
|
.BuiltinFunctionType: ClassType
|
||||||
|
.BuiltinMethodType: ClassType
|
||||||
|
.WrapperDescriptorType: ClassType
|
||||||
|
.MethodWrapperType: ClassType
|
||||||
|
.NotImplementedType: ClassType
|
||||||
|
.MethodDescriptorType: ClassType
|
||||||
|
.ClassMethodDescriptorType: ClassType
|
||||||
|
.ModuleType: ClassType
|
||||||
|
.EllipsisType: ClassType
|
||||||
|
.GenericAlias: (Type, GenericTuple) -> ClassType # TODO: Tuple Type
|
||||||
|
.UnionType: (Type, Type) -> Type
|
||||||
|
|
||||||
|
.TracebackType: ClassType
|
||||||
|
.FrameType: ClassType
|
||||||
|
.MappingProxyType: ClassType
|
Loading…
Add table
Add a link
Reference in a new issue