mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
152 lines
5.6 KiB
Markdown
152 lines
5.6 KiB
Markdown
## API Report File for "@keymanapp/kmc-model"
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
```ts
|
|
|
|
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
|
import { CompilerEvent } from '@keymanapp/developer-utils';
|
|
import { CompilerOptions } from '@keymanapp/developer-utils';
|
|
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
|
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
|
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
|
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
|
|
|
// Warning: (ae-forgotten-export) The symbol "CasingFunction" needs to be exported by the entry point main.d.ts
|
|
//
|
|
// @public
|
|
export type CasedWordformToKeySpec = (term: string, applyCasing?: CasingFunction) => string;
|
|
|
|
// @public
|
|
export class LexicalModelCompiler implements KeymanCompiler {
|
|
// @internal
|
|
generateLexicalModelCode(model_id: string, modelSource: LexicalModelSource, sourcePath: string): string;
|
|
init(callbacks: CompilerCallbacks, _options: CompilerOptions): Promise<boolean>;
|
|
// @internal
|
|
loadFromFilename(filename: string): LexicalModelSource;
|
|
run(inputFilename: string, outputFilename?: string): Promise<LexicalModelCompilerResult>;
|
|
// @internal (undocumented)
|
|
transpileSources(sources: Array<string>): Array<string>;
|
|
write(artifacts: LexicalModelCompilerArtifacts): Promise<boolean>;
|
|
}
|
|
|
|
// @public
|
|
export interface LexicalModelCompilerArtifacts extends KeymanCompilerArtifacts {
|
|
js: KeymanCompilerArtifact;
|
|
}
|
|
|
|
// @public
|
|
export interface LexicalModelCompilerResult extends KeymanCompilerResult {
|
|
artifacts: LexicalModelCompilerArtifacts;
|
|
}
|
|
|
|
// Warning: (ae-forgotten-export) The symbol "LexicalModelDeclaration" needs to be exported by the entry point main.d.ts
|
|
//
|
|
// @public
|
|
export interface LexicalModelSource extends LexicalModelDeclaration {
|
|
readonly applyCasing?: CasingFunction;
|
|
readonly languageUsesCasing?: boolean;
|
|
// Warning: (ae-forgotten-export) The symbol "LexicalModelPunctuation" needs to be exported by the entry point main.d.ts
|
|
readonly punctuation?: LexicalModelPunctuation;
|
|
readonly rootClass?: string;
|
|
readonly searchTermToKey?: WordformToKeySpec;
|
|
// (undocumented)
|
|
readonly sources: Array<string>;
|
|
readonly wordBreaker?: WordBreakerSpec | SimpleWordBreakerSpec;
|
|
}
|
|
|
|
// Warning: (ae-internal-missing-underscore) The name "ModelCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
|
//
|
|
// @internal (undocumented)
|
|
export class ModelCompilerMessages {
|
|
// (undocumented)
|
|
static ERROR_ModelFileNotFound: number;
|
|
// (undocumented)
|
|
static Error_ModelFileNotFound: (o: {
|
|
filename: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_NoDefaultExport: number;
|
|
// (undocumented)
|
|
static Error_NoDefaultExport: () => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_SearchTermToKeyMustBeExplicitlySpecified: number;
|
|
// (undocumented)
|
|
static Error_SearchTermToKeyMustBeExplicitlySpecified: () => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_UnimplementedModelFormat: number;
|
|
// (undocumented)
|
|
static Error_UnimplementedModelFormat: (o: {
|
|
format: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_UnknownModelFormat: number;
|
|
// (undocumented)
|
|
static Error_UnknownModelFormat: (o: {
|
|
format: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_UnknownWordBreaker: number;
|
|
// (undocumented)
|
|
static Error_UnknownWordBreaker: (o: {
|
|
spec: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_UnsupportedScriptOverride: number;
|
|
// (undocumented)
|
|
static Error_UnsupportedScriptOverride: (o: {
|
|
option: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_UTF16BEUnsupported: number;
|
|
// (undocumented)
|
|
static Error_UTF16BEUnsupported: () => CompilerEvent;
|
|
// (undocumented)
|
|
static ERROR_WordlistFileNotFound: number;
|
|
// (undocumented)
|
|
static Error_WordlistFileNotFound: (o: {
|
|
filename: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static FATAL_UnexpectedException: number;
|
|
// (undocumented)
|
|
static Fatal_UnexpectedException: (o: {
|
|
e: any;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static HINT_DuplicateWordInSameFile: number;
|
|
// (undocumented)
|
|
static Hint_DuplicateWordInSameFile: (o: {
|
|
wordform: string;
|
|
}) => CompilerEvent;
|
|
// (undocumented)
|
|
static HINT_MixedNormalizationForms: number;
|
|
// (undocumented)
|
|
static Hint_MixedNormalizationForms: (o: {
|
|
wordform: string;
|
|
}) => CompilerEvent;
|
|
}
|
|
|
|
// Warning: (ae-forgotten-export) The symbol "WordBreakingFunction" needs to be exported by the entry point main.d.ts
|
|
//
|
|
// @public
|
|
export type SimpleWordBreakerSpec = 'default' | 'ascii' | WordBreakingFunction;
|
|
|
|
// @public
|
|
export type SimpleWordformToKeySpec = (term: string) => string;
|
|
|
|
// @public
|
|
export interface WordBreakerSpec {
|
|
readonly joinWordsAt?: string[];
|
|
// Warning: (ae-forgotten-export) The symbol "OverrideScriptDefaults" needs to be exported by the entry point main.d.ts
|
|
readonly overrideScriptDefaults?: OverrideScriptDefaults;
|
|
// (undocumented)
|
|
readonly use: SimpleWordBreakerSpec;
|
|
}
|
|
|
|
// @public
|
|
export type WordformToKeySpec = SimpleWordformToKeySpec | CasedWordformToKeySpec;
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
```
|