@cloudbet/market-helper
Version:
SDK to generate localized sport market information
33 lines (32 loc) • 826 B
TypeScript
import { Selection } from './api-data-types';
import { Locale } from './sports-core/sports-core-types';
interface Market {
name: string;
primary: boolean;
description: string;
key: string;
lines: Outcome[][];
}
interface Outcome {
name: string;
back: Selection;
lay?: Selection;
variables: {
handicap?: string;
total?: string;
};
}
interface RawSelection extends Selection {
index: number;
}
/** @description does not include the name or any other data that is not included in the api data */
interface RawOutcome {
back: RawSelection;
lay?: RawSelection;
}
declare type RawLine = RawOutcome[];
interface MarketOptions {
locale: Locale;
primaryLineOnly?: boolean;
}
export type { Market, Outcome, MarketOptions, RawLine, RawOutcome, RawSelection, };