plaxtony
Version:
Static code analysis of SC2 Galaxy Script
31 lines (30 loc) • 1.15 kB
TypeScript
import * as lsp from 'vscode-languageserver';
import { TextDocument } from 'vscode-languageserver-textdocument';
import { SC2Archive } from './archive';
import * as dtypes from './dtypes';
export declare type CatalogEntryFamily = dtypes.S2DataCatalogDomain;
export declare type CatalogFileKind = string;
export declare type CatalogKeyName = string;
export interface CatalogEntity {
family: dtypes.S2DataCatalogDomain;
ctype: string;
id: string;
}
export interface CatalogDeclaration extends CatalogEntity {
uri: lsp.DocumentUri;
position: lsp.Position;
}
export interface CatalogDocument {
uri: lsp.DocumentUri;
declarations: {
[type: number]: Map<string, CatalogDeclaration>;
};
}
export declare class CatalogStore {
protected documentMap: Map<string, CatalogDocument>;
remove(uri: lsp.URI): void;
update(doc: TextDocument, archive: SC2Archive): void;
findEntry(family: CatalogEntryFamily): Generator<IterableIterator<CatalogDeclaration>, void, unknown>;
findEntryByName(family: CatalogEntryFamily, id: string): Generator<CatalogDeclaration, void, unknown>;
get docCount(): number;
}