Skip to content

Commit

Permalink
Merge pull request #131 from guybedford/master
Browse files Browse the repository at this point in the history
Add interfaces used by rollup
  • Loading branch information
alangpierce committed Mar 12, 2018
2 parents 13797ce + eb8b2fd commit aa927a2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions index.d.ts
Expand Up @@ -11,11 +11,12 @@ export interface SourceMapOptions {
}

export interface SourceMap {
version: string;
file: string;
sources: string[];
sourcesContent: string;
sourcesContent: string[];
names: string[];
mappings: string[];
mappings: string;

toString(): string;
toUrl(): string;
Expand All @@ -24,17 +25,18 @@ export interface SourceMap {
export class Bundle {
constructor(options?: BundleOptions);
addSource(source: MagicString | { filename?: string, content: MagicString }): Bundle;
append(str: string, options: BundleOptions): Bundle;
append(str: string, options?: BundleOptions): Bundle;
clone(): Bundle;
generateMap(options?: Partial<SourceMapOptions>): SourceMap;
getIndentString(): string;
indent(indentStr?: string): Bundle;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
prepend(str: string): Bundle;
toString(): string;
trimLines(): string;
trim(charType: string): string;
trimStart(charType: string): Bundle;
trimEnd(charType: string): Bundle;
trimLines(): Bundle;
trim(charType?: string): Bundle;
trimStart(charType?: string): Bundle;
trimEnd(charType?: string): Bundle;
}

export type ExclusionRange = [ number, number ];
Expand Down Expand Up @@ -66,6 +68,7 @@ export default class MagicString {

indent(options?: IndentOptions): MagicString;
indent(indentStr?: string, options?: IndentOptions): MagicString;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;

move(start: number, end: number, index: number): MagicString;
overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
Expand Down

0 comments on commit aa927a2

Please sign in to comment.