"Source" types
This commit is contained in:
parent
461a33e467
commit
73fc6bf3f0
1 changed files with 5 additions and 0 deletions
5
lib/source.ts
Normal file
5
lib/source.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export type Cancel = () => void;
|
||||
export type Source<T> = {
|
||||
(): T;
|
||||
(callback: (value: T) => void): Cancel;
|
||||
};
|
Loading…
Add table
Reference in a new issue