d11 theme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
1.4 KiB

/// <reference types="node" />
import { SpellingDictionary } from './SpellingDictionary';
import { ReplaceMap } from '../Settings';
import { Stats } from 'fs-extra';
export interface LoadOptions {
type?: LoaderType;
repMap?: ReplaceMap;
useCompounds?: boolean;
}
export declare type LoaderType = keyof Loaders;
export declare type Loader = (filename: string, options: LoadOptions) => Promise<SpellingDictionary>;
export interface Loaders {
S: Loader;
C: Loader;
T: Loader;
default: Loader;
[index: string]: Loader | undefined;
}
interface CacheEntry {
uri: string;
options: LoadOptions;
ts: number;
state: Promise<Stats | undefined>;
dictionary: Promise<SpellingDictionary>;
}
export declare function loadDictionary(uri: string, options: LoadOptions): Promise<SpellingDictionary>;
export declare function refreshCacheEntries(maxAge?: number, now?: number): Promise<void>;
declare function refreshEntry(entry: CacheEntry, maxAge?: number, now?: number): Promise<void>;
declare function loadEntry(uri: string, options: LoadOptions, now?: number): CacheEntry;
declare function load(uri: string, options: LoadOptions): Promise<SpellingDictionary>;
export declare const testing: {
dictionaryCache: Map<string, CacheEntry>;
refreshEntry: typeof refreshEntry;
loadEntry: typeof loadEntry;
load: typeof load;
};
export {};