- Preparing search index...
- The search index is not available
sdk-v2
Function hasMarketMethods
- hasMarketMethods<C, MS>(market: Data<C, C extends RpcContext<MS> ? RpcMarket<C, MS> | SaturatedRpcMarket<C, MS> : never, C extends IndexerContext | FullContext<MS> ? IndexedMarket<C, MS> : never, MS>): market is Data<C, C extends RpcContext<MS> ? RpcMarket<C, MS> | SaturatedRpcMarket<C, MS> : never, C extends IndexerContext | FullContext<MS> ? IndexedMarket<C, MS> : never, MS> & MarketMethods<C, MS>
-
Type Parameters
-
-
MS extends MetadataStorage<{
__meta: "markets";
categories: undefined | ({ name: string; img?: string | undefined; ticker?: string | undefined; color?: string | undefined; })[];
confidentialId: undefined | string;
description: string;
img: undefined | string;
question: string;
scalarType: undefined | "number" | "date";
slug: string;
tags: undefined | string[];
}, MS> = MetadataStorage<{
__meta: "markets";
categories: undefined | ({ name: string; img?: string | undefined; ticker?: string | undefined; color?: string | undefined; })[];
confidentialId: undefined | string;
description: string;
img: undefined | string;
question: string;
scalarType: undefined | "number" | "date";
slug: string;
tags: undefined | string[];
}>
Typeguard to check if market has associated marketmethods.
Returns
market is Market<C, MS> & MarketMethods