/** * A zero-based position within a source file. * * @public */ export interface ISourcePosition { line: number; column: number; } /** * Associates a position in a generated `.d.ts` file with the position in the source file that * produced it. * * @public */ export interface IDeclarationMapping { /** * The zero-based line in the generated typings, before the generated file header is prepended. */ generatedLine: number; /** * The zero-based column in the generated typings. */ generatedColumn: number; /** * The zero-based position in the source file that produced this declaration. */ sourcePosition: ISourcePosition; } /** * Serializes a declaration source map that points a generated `.d.ts` back at the file that * produced it. TypeScript's language service follows these maps when resolving "go to definition", * so an editor navigates to the original source rather than the generated typings. * * @param mappings - The positions to map. Generated lines are relative to the typings content * produced by the parser, before `generatedLineOffset` is applied. * @param generatedFileName - The file name of the generated typings, used as the map's `file`. * @param sourcePath - The path of the source file, relative to the folder containing the map. * @param generatedLineOffset - The number of header lines prepended to the generated typings. * * @public */ export declare function serializeDeclarationMap(mappings: readonly IDeclarationMapping[], generatedFileName: string, sourcePath: string, generatedLineOffset: number): string; //# sourceMappingURL=DeclarationMap.d.ts.map