import { Hover } from 'vscode-languageserver/node'; import { ParsingContext } from '../types'; import { FileType, TagFileType } from '../types/ClientCache'; import { LintConfig } from '../types/Config'; import { GetFormattedString } from '../types/Formattable'; import { TextRange } from '../types/TextRange'; import { ArgumentNode, DiagnosticMap, GetCodeActions, GetHover, NodeType } from './ArgumentNode'; export declare class IdentityNode extends ArgumentNode { namespace: string | undefined; path: string[]; isTag: boolean; /** * A type in the registry, or a type in cache if beginning with the dolar sign (`$`). */ type: string | undefined; static readonly DefaultNamespace = "minecraft"; static readonly NamespaceDelimiter = ":"; static readonly PathSep = "/"; static readonly TagSymbol = "#"; readonly [NodeType] = "Identity"; constructor(namespace?: string | undefined, path?: string[], isTag?: boolean, /** * A type in the registry, or a type in cache if beginning with the dolar sign (`$`). */ type?: string | undefined); private getTagSymbolPart; private getLongestNamespacePart; private getShortestNamespacePart; private getPathPart; private isDefaultNamespace; /** * Return the standardized namespace of this identity. */ getNamespace(): string; /** * Convert the ID to a stringified ID. Will NOT begin with TagSymbol (`#`) even if the ID is a tag. */ toString(): string; /** * Convert the ID to the shortest stringified ID. WILL NOT begin with TagSymbol (`#`) if the ID is a tag. WILL omit the namespace if it is the default namespace. */ toShortestString(): string; /** * Convert the ID to a stringified tag ID. WILL begin with TagSymbol (`#`) if the ID is a tag. */ toTagString(): string; /** * Convert the ID to the shortest stringified tag ID. WILL begin with TagSymbol (`#`) if the ID is a tag. WILL omit the namespace if it is the default namespace. */ toShortestTagString(): string; [GetFormattedString](_lint?: LintConfig): string; [GetCodeActions](uri: string, ctx: ParsingContext, range: TextRange, diagnostics: DiagnosticMap): import("vscode-languageserver-types").CodeAction[]; [GetHover](ctx: ParsingContext): Hover | null; /** * Convert the ID to a file path. * @param category The category of this namespaced ID. e.g. `function`, `advancement`, etc. * @param ext The extension of the file. Defaults to `.json`. * @param side Is the ID serverside or clientside. Values: `assets` and `data`. Defaults to `data`. */ toRel(category: FileType, side?: 'assets' | 'data'): string; /** * * @param rel The relative path from the workspace. Returns `undefined` if the path is in an invalid * datapack category. */ static fromRel(rel: string | undefined): { id: IdentityNode; category: FileType; side: 'assets' | 'data'; } | undefined; static fromString(str: string): IdentityNode; /** * Get the tag cache type. * @param type A type in the registry, or a type in cache if beginning with the dollar sign (`$`). */ static getTagType(type: string): TagFileType | undefined; }