Skip to content

Commit

Permalink
add interfaces used by rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Dec 22, 2017
1 parent 13797ce commit b9654af
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ export interface SourceMap {
}

export class Bundle {
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
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;
prepend(str: string): Bundle;
toString(): string;
trimLines(): string;
trim(charType: string): string;
trimStart(charType: string): Bundle;
trimEnd(charType: string): Bundle;
trim(charType?: string): string;
trimStart(charType?: string): Bundle;
trimEnd(charType?: string): Bundle;
}

export type ExclusionRange = [ number, number ];
Expand All @@ -55,6 +56,8 @@ export interface OverwriteOptions {
}

export default class MagicString {
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;

constructor(str: string, options?: MagicStringOptions);
addSourcemapLocation(char: number): void;
append(content: string): MagicString;
Expand Down

0 comments on commit b9654af

Please sign in to comment.