Skip to content

Commit 1185aa6

Browse files
Merge pull request #91 from firefligher/master
Separated IAsyncComputedValueBase<T> from IAsyncComputedValue<T>
2 parents 4301e7e + e243ecd commit 1185aa6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

types/index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ export default class AsyncComputed {
1414

1515
export type AsyncComputedGetter<T> = () => Promise<T>;
1616

17-
export interface IAsyncComputedValue<T> {
17+
export interface IAsyncComputedValueBase<T> {
1818
default?: T | (() => T);
19-
get: AsyncComputedGetter<T>;
2019
watch?: string[] | (() => void);
2120
shouldUpdate?: () => boolean;
2221
lazy?: boolean;
2322
}
2423

24+
export interface IAsyncComputedValue<T> extends IAsyncComputedValueBase<T> {
25+
get: AsyncComputedGetter<T>;
26+
}
27+
2528
export interface AsyncComputedObject {
2629
[K: string]: AsyncComputedGetter<any> | IAsyncComputedValue<any>;
2730
}

0 commit comments

Comments
 (0)