UNPKG

bc-minecraft-bedrock-types

Version:

The typescript library that provides default types for minecraft bedrock

38 lines (37 loc) 945 B
import { JsonPath } from "./json-path"; import { OffsetWord } from "./offset-word"; import { Position } from "./position"; import { Range } from "./range"; /**The type of a document location */ export type DocumentLocation = Position | OffsetWord | JsonPath | number; /** */ export type TextOrDoc = string | { getText(): string; }; /** * */ export declare namespace DocumentLocation { /**TODO add documentation * * @param data * @param text * @returns */ function toOffset(data: DocumentLocation, text: TextOrDoc): number; /**TODO add documentation * * @param data * @param text * @returns */ function toPosition(data: DocumentLocation, text: TextOrDoc): Position; /**TODO add documentation * * @param data * @param text * @param length * @returns */ function ToRange(data: DocumentLocation, text: TextOrDoc, length: number): Range; }