Skip to content

Commit

Permalink
Fix ts config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkiro committed Mar 13, 2024
1 parent 0ac748c commit 1207f93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/scripts/make-word-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import fs from "fs";

import { isSuperset } from "../lib/utils";

const WORD_LIST_FP: string = "./src/assets/words/word-list.json";
const GAME_LIST_FP: string = "./src/assets/words/game-list.json";

Expand All @@ -14,6 +12,15 @@ const MAX_WORD_SIZE: number = 5;

const RAW_WORDS_URL: string = "https://raw.githubusercontent.com/wordnik/wordlist/main/wordlist-20210729.txt";

export function isSuperset(set: Set<any>, subset: Iterable<any>): boolean {
for (const elem of subset) {
if (!set.has(elem)) {
return false;
}
}
return true;
}

function isWordValid(word: string): boolean {
if (word.length < MIN_LETTERS || word.length > MAX_LETTERS) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/lib/*"],
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/lib/**/*"],
"exclude": ["src/**/__tests__/*", "src/scripts"],
"compilerOptions": {
"composite": true,
Expand Down

0 comments on commit 1207f93

Please sign in to comment.