aboutsummaryrefslogtreecommitdiff
path: root/types/ext
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-02-27 13:16:21 +0100
committerGitHub <noreply@github.com>2024-02-27 12:16:21 +0000
commit0792954e345925b3e3b2ebb733367e138375978e (patch)
treea9f169cf7dc2de396d6e46c9d8c418f9870d9301 /types/ext
parentc4fea2251606fb0b3d0d761a544dac578f3d9048 (diff)
make deinflections language-specific (#720)
* abstract deinflections * undo redundant changes * remove cast * MultiLanguageTransformer * comments * comments
Diffstat (limited to 'types/ext')
-rw-r--r--types/ext/language-descriptors.d.ts1
-rw-r--r--types/ext/language-transformer-internal.d.ts8
-rw-r--r--types/ext/language.d.ts1
-rw-r--r--types/ext/offscreen.d.ts2
4 files changed, 11 insertions, 1 deletions
diff --git a/types/ext/language-descriptors.d.ts b/types/ext/language-descriptors.d.ts
index ca457721..79668da4 100644
--- a/types/ext/language-descriptors.d.ts
+++ b/types/ext/language-descriptors.d.ts
@@ -32,6 +32,7 @@ type LanguageDescriptor<TIso extends string, TTextPreprocessorDescriptor extends
*/
isTextLookupWorthy?: IsTextLookupWorthyFunction;
textPreprocessors: TTextPreprocessorDescriptor;
+ languageTransformsFile?: string;
};
type TextPreprocessorDescriptor = {
diff --git a/types/ext/language-transformer-internal.d.ts b/types/ext/language-transformer-internal.d.ts
index c186eeca..fdabc0fb 100644
--- a/types/ext/language-transformer-internal.d.ts
+++ b/types/ext/language-transformer-internal.d.ts
@@ -40,3 +40,11 @@ export type TraceFrame = {
transform: string;
ruleIndex: number;
};
+
+export type ConditionTypeToConditionFlagsMap = Map<string, number>;
+
+export type LanguageTransformDescriptorInternal = {
+ transforms: Transform[];
+ conditionTypeToConditionFlagsMap: ConditionTypeToConditionFlagsMap;
+ partOfSpeechToConditionFlagsMap: ConditionTypeToConditionFlagsMap;
+};
diff --git a/types/ext/language.d.ts b/types/ext/language.d.ts
index 8e5a5c70..a50d3d4b 100644
--- a/types/ext/language.d.ts
+++ b/types/ext/language.d.ts
@@ -51,4 +51,5 @@ export type LanguageSummary = {
name: string;
iso: string;
exampleText: string;
+ languageTransformsFile?: string;
};
diff --git a/types/ext/offscreen.d.ts b/types/ext/offscreen.d.ts
index 443e0b64..777756b9 100644
--- a/types/ext/offscreen.d.ts
+++ b/types/ext/offscreen.d.ts
@@ -52,7 +52,7 @@ type ApiSurface = {
};
translatorPrepareOffscreen: {
params: {
- descriptor: LanguageTransformDescriptor;
+ descriptors: LanguageTransformDescriptor[];
};
return: void;
};