0.3.7 • Published 6 months ago
@types/poker-evaluator v0.3.7
Installation
npm install --save @types/poker-evaluator
Summary
This package contains type definitions for poker-evaluator (https://github.com/chenosaurus/poker-evaluator).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/poker-evaluator.
index.d.ts
// Type definitions for poker-evaluator 0.3
// Project: https://github.com/chenosaurus/poker-evaluator
// Definitions by: Rory McGuinness <https://github.com/rorymcgit>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export const HANDTYPES: HandName[];
export const CARDS: Deck;
export const ranks: Buffer;
export function evalHand(cards: string[] | number[]): EvaluatedHand;
export type HandName =
'invalid hand' |
'high card' |
'one pair' |
'two pairs' |
'three of a kind' |
'straight' |
'flush' |
'full house' |
'four of a kind' |
'straight flush';
export interface Deck {
[key: string]: number;
}
export interface EvaluatedHand {
handType: number; // Index of HANDTYPES array
handRank: number;
value: number;
handName: HandName;
}
Additional Details
- Last updated: Thu, 16 Dec 2021 22:32:04 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Rory McGuinness.