@scrabble-solver/solver 2.15.11 → 2.15.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const areDigraphsValid: (config: Config, pattern: Pattern) => boolean;
@@ -1,5 +1,5 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Config, Pattern, Tile } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Config, type Pattern, type Tile } from '@scrabble-solver/types';
3
3
  export declare const fillPattern: (trie: Trie, config: Config, pattern: Pattern, tiles: Tile[]) => Pattern[];
4
4
  export declare const fillPatternRecursive: (
5
5
  /** gets mutated when this function is called */
@@ -1,2 +1,2 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
  export declare const generateEndIndices: (cells: Cell[], startIndex: number) => number[];
@@ -1,2 +1,2 @@
1
- import { Board, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const generateHorizontalPatterns: (config: Config, board: Board) => Pattern[];
@@ -1,4 +1,4 @@
1
- import { Board, Cell, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Cell, type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const generatePattern: <P extends Pattern>({ board, cells, config, PatternModel, }: {
3
3
  board: Board;
4
4
  cells: Cell[];
@@ -1,2 +1,2 @@
1
- import { Board, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const generatePatterns: (config: Config, board: Board) => Pattern[];
@@ -1,2 +1,2 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
  export declare const generateStartIndices: (cells: Cell[]) => number[];
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
  interface Parameters {
3
3
  getNthVector: (index: number) => Cell[];
4
4
  vectorsCount: number;
@@ -1,2 +1,2 @@
1
- import { Board, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const generateVerticalPatterns: (config: Config, board: Board) => Pattern[];
@@ -1,2 +1,2 @@
1
- import { Cell, Config } from '@scrabble-solver/types';
1
+ import { type Cell, type Config } from '@scrabble-solver/types';
2
2
  export declare const getCellsScore: (config: Config, cells: Cell[]) => number;
@@ -1,2 +1,2 @@
1
- import { Pattern } from '@scrabble-solver/types';
1
+ import { type Pattern } from '@scrabble-solver/types';
2
2
  export declare const getPatternHash: (pattern: Pattern) => string;
@@ -1,2 +1,2 @@
1
- import { Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Config, type Pattern } from '@scrabble-solver/types';
2
2
  export declare const getPatternScore: (config: Config, pattern: Pattern) => number;
@@ -1,2 +1,2 @@
1
- import { Pattern } from '@scrabble-solver/types';
1
+ import { type Pattern } from '@scrabble-solver/types';
2
2
  export declare const getUniquePatterns: (patterns: Pattern[]) => Pattern[];
package/build/solve.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Board, Config, ResultJson, Tile } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Board, type Config, type ResultJson, type Tile } from '@scrabble-solver/types';
3
3
  export declare const solve: (trie: Trie, config: Config, board: Board, tiles: Tile[]) => ResultJson[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/solver",
3
- "version": "2.15.11",
3
+ "version": "2.15.12",
4
4
  "description": "Scrabble Solver 2 - Solver",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@kamilmielnik/trie": "^4.0.0",
27
- "@scrabble-solver/types": "^2.15.11"
27
+ "@scrabble-solver/types": "^2.15.12"
28
28
  },
29
29
  "devDependencies": {
30
- "@scrabble-solver/configs": "^2.15.11",
31
- "@scrabble-solver/constants": "^2.15.11",
32
- "@scrabble-solver/dictionaries": "^2.15.11"
30
+ "@scrabble-solver/configs": "^2.15.12",
31
+ "@scrabble-solver/constants": "^2.15.12",
32
+ "@scrabble-solver/dictionaries": "^2.15.12"
33
33
  },
34
- "gitHead": "4fa527098d5e67120adb7964777c044a09378332"
34
+ "gitHead": "1eeef2b2975e63b195885dd2636c53624d300c6b"
35
35
  }
@@ -1,4 +1,4 @@
1
- import { Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Config, type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  export const areDigraphsValid = (config: Config, pattern: Pattern): boolean => {
4
4
  const { twoCharacterTiles } = config;
@@ -1,7 +1,7 @@
1
- import { Trie } from '@kamilmielnik/trie';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
2
  import { getConfig } from '@scrabble-solver/configs';
3
3
  import { dictionaries } from '@scrabble-solver/dictionaries';
4
- import { Board, Cell, FinalPattern, Game, Locale, Pattern, Tile, VerticalPattern } from '@scrabble-solver/types';
4
+ import { Board, Cell, FinalPattern, Game, Locale, type Pattern, Tile, VerticalPattern } from '@scrabble-solver/types';
5
5
 
6
6
  import { fillPattern, fillPatternRecursive } from './fillPattern';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable max-params, max-statements */
2
- import { Trie } from '@kamilmielnik/trie';
2
+ import { type Trie } from '@kamilmielnik/trie';
3
3
  import { EMPTY_CELL } from '@scrabble-solver/constants';
4
- import { Config, FinalPattern, Pattern, Tile } from '@scrabble-solver/types';
4
+ import { type Config, FinalPattern, type Pattern, type Tile } from '@scrabble-solver/types';
5
5
 
6
6
  export const fillPattern = (trie: Trie, config: Config, pattern: Pattern, tiles: Tile[]): Pattern[] => {
7
7
  if (pattern.getEmptyCellsCount() > tiles.length) {
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
 
3
3
  import { generateEndIndices } from './generateEndIndices';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
 
3
3
  export const generateEndIndices = (cells: Cell[], startIndex: number): number[] => {
4
4
  if (cells.length === 0) {
@@ -1,5 +1,5 @@
1
1
  import { EMPTY_CELL } from '@scrabble-solver/constants';
2
- import { Board, Config } from '@scrabble-solver/types';
2
+ import { Board, type Config } from '@scrabble-solver/types';
3
3
 
4
4
  import { generateHorizontalPatterns } from './generateHorizontalPatterns';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Board, Config, HorizontalPattern, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, HorizontalPattern, type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { generatePattern } from './generatePattern';
4
4
  import { generateVectors } from './generateVectors';
@@ -1,4 +1,4 @@
1
- import { Board, Cell, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Cell, type Config, type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { generateEndIndices } from './generateEndIndices';
4
4
  import { generateStartIndices } from './generateStartIndices';
@@ -1,4 +1,4 @@
1
- import { Board, Config, Pattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { generateHorizontalPatterns } from './generateHorizontalPatterns';
4
4
  import { generateVerticalPatterns } from './generateVerticalPatterns';
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
 
3
3
  import { generateStartIndices } from './generateStartIndices';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
 
3
3
  export const generateStartIndices = (cells: Cell[]): number[] => {
4
4
  if (cells.length === 0) {
@@ -1,4 +1,4 @@
1
- import { Cell } from '@scrabble-solver/types';
1
+ import { type Cell } from '@scrabble-solver/types';
2
2
 
3
3
  interface Parameters {
4
4
  getNthVector: (index: number) => Cell[];
@@ -1,5 +1,5 @@
1
1
  import { EMPTY_CELL } from '@scrabble-solver/constants';
2
- import { Board, Config } from '@scrabble-solver/types';
2
+ import { Board, type Config } from '@scrabble-solver/types';
3
3
 
4
4
  import { generateVerticalPatterns } from './generateVerticalPatterns';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Board, Config, Pattern, VerticalPattern } from '@scrabble-solver/types';
1
+ import { type Board, type Config, type Pattern, VerticalPattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { generatePattern } from './generatePattern';
4
4
  import { generateVectors } from './generateVectors';
@@ -1,5 +1,5 @@
1
1
  import { NO_BONUS } from '@scrabble-solver/constants';
2
- import { Cell, Config } from '@scrabble-solver/types';
2
+ import { type Cell, type Config } from '@scrabble-solver/types';
3
3
 
4
4
  export const getCellsScore = (config: Config, cells: Cell[]): number => {
5
5
  const total = cells.reduce(
@@ -1,4 +1,4 @@
1
- import { Pattern } from '@scrabble-solver/types';
1
+ import { type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  export const getPatternHash = (pattern: Pattern): string => {
4
4
  return pattern.cells
@@ -1,4 +1,4 @@
1
- import { Config, isMultiplierBingo, isScoreBingo, Pattern } from '@scrabble-solver/types';
1
+ import { type Config, isMultiplierBingo, isScoreBingo, type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { getCellsScore } from './getCellsScore';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Pattern } from '@scrabble-solver/types';
1
+ import { type Pattern } from '@scrabble-solver/types';
2
2
 
3
3
  import { getPatternHash } from './getPatternHash';
4
4
 
package/src/solve.test.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable max-lines */
2
2
 
3
- import { Trie } from '@kamilmielnik/trie';
3
+ import { type Trie } from '@kamilmielnik/trie';
4
4
  import { getConfig } from '@scrabble-solver/configs';
5
5
  import { dictionaries } from '@scrabble-solver/dictionaries';
6
6
  import { Board, Game, Locale, Result, Tile } from '@scrabble-solver/types';
package/src/solve.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Board, Config, ResultJson, Tile } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Board, type Config, type ResultJson, type Tile } from '@scrabble-solver/types';
3
3
 
4
4
  import { areDigraphsValid } from './areDigraphsValid';
5
5
  import { fillPattern } from './fillPattern';