From 73fc6bf3f0ec1db1bbd9445d940627a3cc6a04d4 Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Tue, 23 Jan 2024 23:29:03 -0500 Subject: [PATCH] "Source" types --- lib/source.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/source.ts diff --git a/lib/source.ts b/lib/source.ts new file mode 100644 index 0000000..c975a69 --- /dev/null +++ b/lib/source.ts @@ -0,0 +1,5 @@ +export type Cancel = () => void; +export type Source = { + (): T; + (callback: (value: T) => void): Cancel; +};