aboutsummaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2024-01-20 10:43:27 +0700
committerGitHub <noreply@github.com>2024-01-20 03:43:27 +0000
commit0011afe435f565dc5669f030da64e2c6e10ce05e (patch)
treeb7cc9598d6a958cbfdd15fff32294ab85dda550e /types
parentbe267e1994f8fda2ef68562c5c3a5edc9442a8a8 (diff)
improve dictionary validation (#520)
* improve dictionary validation * fix * improve performance * add undefined check * rename types * rename types * rename
Diffstat (limited to 'types')
-rw-r--r--types/dev/dictionary-validate.d.ts5
-rw-r--r--types/ext/dictionary-importer.d.ts4
2 files changed, 7 insertions, 2 deletions
diff --git a/types/dev/dictionary-validate.d.ts b/types/dev/dictionary-validate.d.ts
index d3f8a8be..02d01b78 100644
--- a/types/dev/dictionary-validate.d.ts
+++ b/types/dev/dictionary-validate.d.ts
@@ -29,3 +29,8 @@ export type Schemas = {
termBankV3: Schema;
termMetaBankV3: Schema;
};
+
+/**
+ * An array of tuples of a regular expression for file types inside a dictionary and its corresponding schema.
+ */
+export type SchemasDetails = [fileNameFormat: RegExp, schema: unknown][];
diff --git a/types/ext/dictionary-importer.d.ts b/types/ext/dictionary-importer.d.ts
index 828ca86a..17bd1bb4 100644
--- a/types/ext/dictionary-importer.d.ts
+++ b/types/ext/dictionary-importer.d.ts
@@ -113,9 +113,9 @@ export type ImportRequirementContext = {
export type ArchiveFileMap = Map<string, ZipJS.Entry>;
/**
- * A map of file types inside a dictionary and its corresponding regular expressions.
+ * An array of tuples of a file type inside a dictionary and its corresponding regular expression.
*/
-export type QueryDetails = Map<string, RegExp>;
+export type QueryDetails = [fileType: string, fileNameFormat: RegExp][];
/**
* A map of file types inside a dictionary and its matching entries.