lodash-template-js-parser
Version:
A JavaScript parser for lodash.template
44 lines (43 loc) • 1.12 kB
TypeScript
import { SourceCodeStore } from "../service/SourceCodeStore";
/**
* Objects which have their location.
*/
export declare class HasLocation {
start: number;
end: number;
private range;
private _sourceCodeStore;
private _loc;
/**
* constructor.
* @param {number} startIndex The start index of range.
* @param {number} endIndex The end index of range.
* @param {SourceCodeStore} sourceCodeStore The sourceCodeStore.
* @returns {void}
*/
constructor(startIndex: number, endIndex: number, sourceCodeStore: SourceCodeStore);
/**
* Get the source code store
* @returns {SourceCodeStore} source code store
*/
readonly sourceCodeStore: SourceCodeStore;
/**
* Get the location info
* @returns {object} The location info
*/
readonly loc: {
start: {
line: number;
column: number;
};
end: {
line: number;
column: number;
};
};
/**
* Get text of range.
* @returns {string} The text of range.
*/
getText(): string;
}