Skip to content

Commit 22802a6

Browse files
committed
feat: document OpeningSource types, add missing fics and eco_wikip.g
Type OpeningSource now documents each source: - eco_wikip = Wikipedia chess openings pages - eco_wikip.g = Wikipedia List of chess gambits (wikiGambits parser) - wiki_b = Wikibooks Chess Opening Theory - fics = Free Internet Chess Server (parser missing) aliases field is now Partial<Record<OpeningSource, string>> — every alias key must be a valid source.
1 parent 0397542 commit 22802a6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
/**
22
* Source of the opening data.
33
* eco_tsv is the authoritative source from lichess.
4+
* eco_wikip = Wikipedia chess openings pages
5+
* eco_wikip.g = Wikipedia "List of chess gambits" page (wikiGambits parser)
6+
* wiki_b = Wikibooks Chess Opening Theory (wikiChessOpeningTheoryCrawler)
7+
* fics = Free Internet Chess Server opening database (parser unknown/missing)
48
*/
59
export type OpeningSource =
610
| "eco_tsv"
711
| "eco_js"
812
| "scid"
913
| "eco_wikip"
14+
| "eco_wikip.g"
1015
| "wiki_b"
16+
| "fics"
1117
| "ct"
1218
| "chessGraph"
1319
| "chronos"
@@ -36,8 +42,8 @@ export interface Opening {
3642
/** Common English name of the opening */
3743
name: string;
3844

39-
/** Alternative names from other sources */
40-
aliases?: Record<string, string>;
45+
/** Alternative names from other sources, keyed by OpeningSource */
46+
aliases?: Partial<Record<OpeningSource, string>>;
4147

4248
/** Extended SCID code when applicable */
4349
scid?: string;

0 commit comments

Comments
 (0)