0.3.7 • Published 6 months ago

@types/poker-evaluator v0.3.7

Weekly downloads
22
License
MIT
Repository
github
Last release
6 months ago

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.

0.3.6

7 months ago

0.3.5

8 months ago

0.3.7

6 months ago

0.3.4

2 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

5 years ago