1 | /**
|
---|
2 | * Copyright 2019 The AMP HTML Authors. All Rights Reserved.
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | */
|
---|
16 | interface SourceMapV3 {
|
---|
17 | file?: string | null;
|
---|
18 | names: string[];
|
---|
19 | sourceRoot?: string;
|
---|
20 | sources: (string | null)[];
|
---|
21 | sourcesContent?: (string | null)[];
|
---|
22 | version: 3;
|
---|
23 | }
|
---|
24 | declare type Column = number;
|
---|
25 | declare type SourcesIndex = number;
|
---|
26 | declare type SourceLine = number;
|
---|
27 | declare type SourceColumn = number;
|
---|
28 | declare type NamesIndex = number;
|
---|
29 | export declare type SourceMapSegment = [Column] | [Column, SourcesIndex, SourceLine, SourceColumn] | [Column, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
|
---|
30 | export interface RawSourceMap extends SourceMapV3 {
|
---|
31 | mappings: string;
|
---|
32 | }
|
---|
33 | export interface DecodedSourceMap extends SourceMapV3 {
|
---|
34 | mappings: SourceMapSegment[][];
|
---|
35 | }
|
---|
36 | export interface SourceMapSegmentObject {
|
---|
37 | column: number;
|
---|
38 | line: number;
|
---|
39 | name: string;
|
---|
40 | source: {
|
---|
41 | content: string | null;
|
---|
42 | filename: string;
|
---|
43 | };
|
---|
44 | }
|
---|
45 | export declare type SourceMapInput = string | RawSourceMap | DecodedSourceMap;
|
---|
46 | export declare type SourceMapLoader = (file: string) => SourceMapInput | null | undefined;
|
---|
47 | export declare type Options = {
|
---|
48 | excludeContent: boolean;
|
---|
49 | decodedMappings: boolean;
|
---|
50 | };
|
---|
51 | export {};
|
---|