onix-chess
Advanced tools
Comparing version 5.5.0 to 5.7.0
@@ -81,2 +81,3 @@ import { Position } from './Position'; | ||
constructor(data?: IGameData); | ||
get RawData(): Readonly<IGameData>; | ||
get CurrentMove(): Move; | ||
@@ -83,0 +84,0 @@ get CurrentPos(): Position; |
@@ -202,2 +202,5 @@ "use strict"; | ||
} | ||
get RawData() { | ||
return this.data; | ||
} | ||
get CurrentMove() { | ||
@@ -204,0 +207,0 @@ return this.currentMove; |
@@ -101,4 +101,7 @@ import { IUser } from 'onix-core/dist/app/IUser'; | ||
increment: number; | ||
white: number; | ||
black: number; | ||
} | ||
export interface ICorrespondenceClock { | ||
running: boolean; | ||
daysPerTurn: number; | ||
@@ -119,2 +122,6 @@ increment: number; | ||
} | ||
declare type AnyClock = IBlitzClock | ICorrespondenceClock | IAdvanceClock; | ||
export declare function isBlitzClock(c?: AnyClock): c is IBlitzClock; | ||
export declare function isCorrespondenceClock(c?: AnyClock): c is ICorrespondenceClock; | ||
export declare function isAdvanceClock(c?: AnyClock): c is IAdvanceClock; | ||
export interface IUserAnalysis { | ||
@@ -176,1 +183,2 @@ blunder: number; | ||
} | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isAdvanceClock = exports.isCorrespondenceClock = exports.isBlitzClock = void 0; | ||
function isBlitzClock(c) { | ||
return !!c && ('initial' in c); | ||
} | ||
exports.isBlitzClock = isBlitzClock; | ||
function isCorrespondenceClock(c) { | ||
return !!c && ('daysPerTurn' in c); | ||
} | ||
exports.isCorrespondenceClock = isCorrespondenceClock; | ||
function isAdvanceClock(c) { | ||
return !!c && ('totalTime' in c); | ||
} | ||
exports.isAdvanceClock = isAdvanceClock; | ||
//# sourceMappingURL=Interfaces.js.map |
{ | ||
"name": "onix-chess", | ||
"version": "5.5.0", | ||
"version": "5.7.0", | ||
"description": "Onix chess library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -238,3 +238,3 @@ import toSafeInteger from 'lodash-es/toSafeInteger'; | ||
this.data = data || defaultGameData; | ||
this.Tags = new ChessTags(this); | ||
@@ -252,7 +252,11 @@ this.Altered = false; | ||
public get CurrentMove() { | ||
public get RawData(): Readonly<IGameData> { | ||
return this.data; | ||
} | ||
public get CurrentMove(): Move { | ||
return this.currentMove; | ||
} | ||
public get CurrentPos() { | ||
public get CurrentPos(): Position { | ||
return this.currentPos; | ||
@@ -259,0 +263,0 @@ } |
@@ -124,5 +124,8 @@ import { IUser } from 'onix-core/dist/app/IUser'; | ||
increment: number; | ||
white: number; | ||
black: number; | ||
} | ||
export interface ICorrespondenceClock { | ||
running: boolean; | ||
daysPerTurn: number; | ||
@@ -145,2 +148,16 @@ increment: number; | ||
type AnyClock = IBlitzClock | ICorrespondenceClock | IAdvanceClock; | ||
export function isBlitzClock(c?: AnyClock): c is IBlitzClock { | ||
return !!c && ('initial' in c); | ||
} | ||
export function isCorrespondenceClock(c?: AnyClock): c is ICorrespondenceClock { | ||
return !!c && ('daysPerTurn' in c); | ||
} | ||
export function isAdvanceClock(c?: AnyClock): c is IAdvanceClock { | ||
return !!c && ('totalTime' in c); | ||
} | ||
export interface IUserAnalysis { | ||
@@ -147,0 +164,0 @@ blunder: number; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
466196
8873