@@ -50,7 +50,11 @@ export const AsyncPrototype: AsyncPrototype = Object.freeze({
|
|||||||
export const isAsync = (u: unknown): u is Async => Predicate.hasProperty(u, AsyncTypeId)
|
export const isAsync = (u: unknown): u is Async => Predicate.hasProperty(u, AsyncTypeId)
|
||||||
|
|
||||||
export const async = <T extends Component.Component<any, any, any, any>>(
|
export const async = <T extends Component.Component<any, any, any, any>>(
|
||||||
self: T
|
self: T & (
|
||||||
|
"promise" extends keyof Component.Component.Props<T>
|
||||||
|
? "'promise' prop name is reserved for Async components. Please rename the 'promise' prop to something else."
|
||||||
|
: T
|
||||||
|
)
|
||||||
): (
|
): (
|
||||||
& Omit<T, keyof Component.Component.AsComponent<T>>
|
& Omit<T, keyof Component.Component.AsComponent<T>>
|
||||||
& Component.Component<
|
& Component.Component<
|
||||||
|
|||||||
Reference in New Issue
Block a user