Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Annotations for ring.util.io

  • Loading branch information...
commit b4f32193708822d365b39397b4448e67320b2333 1 parent c97d389
@brehaut authored
Showing with 24 additions and 1 deletion.
  1. +24 −1 src/ring/typed/util/io.clj
View
25 src/ring/typed/util/io.clj
@@ -1,11 +1,34 @@
(ns ring.typed.util.io
(:require ring.util.io
+ [clojure.java.io :as io]
[clojure.core.typed :refer [ann
- tc-ignore]])
+ tc-ignore
+ def-alias]])
(:import (java.io PipedInputStream
PipedOutputStream
ByteArrayInputStream
Closeable
IOException)))
+;; clojure.core - enventually will be bundled as a patch
+(def-alias Future
+ (TFn [[x :variance :covariant]]
+ (I (clojure.lang.IDeref x)
+ clojure.lang.IPending
+ java.util.concurrent.Future)))
+
+(ann clojure.core/future-call
+ (All [x]
+ [[-> x] -> (Future x)]))
+
+;; ring
+
+(ann piped-input-stream
+ [[PipedOutputStream -> Any] -> PipedInputStream])
+
+(ann string-input-stream
+ (Fn [String -> ByteArrayInputStream]
+ [String String -> ByteArrayInputStream]))
+
+(ann close! [java.io.Closeable -> nil])
Please sign in to comment.
Something went wrong with that request. Please try again.