Node-Red configuration
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

source-map.d.ts 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. declare module 'source-map-js' {
  2. export interface StartOfSourceMap {
  3. file?: string;
  4. sourceRoot?: string;
  5. }
  6. export interface RawSourceMap extends StartOfSourceMap {
  7. version: string;
  8. sources: string[];
  9. names: string[];
  10. sourcesContent?: string[];
  11. mappings: string;
  12. }
  13. export interface Position {
  14. line: number;
  15. column: number;
  16. }
  17. export interface LineRange extends Position {
  18. lastColumn: number;
  19. }
  20. export interface FindPosition extends Position {
  21. // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND
  22. bias?: number;
  23. }
  24. export interface SourceFindPosition extends FindPosition {
  25. source: string;
  26. }
  27. export interface MappedPosition extends Position {
  28. source: string;
  29. name?: string;
  30. }
  31. export interface MappingItem {
  32. source: string;
  33. generatedLine: number;
  34. generatedColumn: number;
  35. originalLine: number;
  36. originalColumn: number;
  37. name: string;
  38. }
  39. export class SourceMapConsumer {
  40. static GENERATED_ORDER: number;
  41. static ORIGINAL_ORDER: number;
  42. static GREATEST_LOWER_BOUND: number;
  43. static LEAST_UPPER_BOUND: number;
  44. constructor(rawSourceMap: RawSourceMap);
  45. computeColumnSpans(): void;
  46. originalPositionFor(generatedPosition: FindPosition): MappedPosition;
  47. generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
  48. allGeneratedPositionsFor(originalPosition: MappedPosition): Position[];
  49. hasContentsOfAllSources(): boolean;
  50. sourceContentFor(source: string, returnNullOnMissing?: boolean): string;
  51. eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void;
  52. }
  53. export interface Mapping {
  54. generated: Position;
  55. original: Position;
  56. source: string;
  57. name?: string;
  58. }
  59. export class SourceMapGenerator {
  60. constructor(startOfSourceMap?: StartOfSourceMap);
  61. static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator;
  62. addMapping(mapping: Mapping): void;
  63. setSourceContent(sourceFile: string, sourceContent: string): void;
  64. applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
  65. toString(): string;
  66. }
  67. export interface CodeWithSourceMap {
  68. code: string;
  69. map: SourceMapGenerator;
  70. }
  71. export class SourceNode {
  72. constructor();
  73. constructor(line: number, column: number, source: string);
  74. constructor(line: number, column: number, source: string, chunk?: string, name?: string);
  75. static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode;
  76. add(chunk: string): void;
  77. prepend(chunk: string): void;
  78. setSourceContent(sourceFile: string, sourceContent: string): void;
  79. walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
  80. walkSourceContents(fn: (file: string, content: string) => void): void;
  81. join(sep: string): SourceNode;
  82. replaceRight(pattern: string, replacement: string): SourceNode;
  83. toString(): string;
  84. toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
  85. }
  86. }
  87. declare module 'source-map-js/lib/source-map-generator' {
  88. import { SourceMapGenerator } from 'source-map-js'
  89. export { SourceMapGenerator }
  90. }
  91. declare module 'source-map-js/lib/source-map-consumer' {
  92. import { SourceMapConsumer } from 'source-map-js'
  93. export { SourceMapConsumer }
  94. }
  95. declare module 'source-map-js/lib/source-node' {
  96. import { SourceNode } from 'source-map-js'
  97. export { SourceNode }
  98. }