Skip to content

Commit

Permalink
Add missing type definitions for initialize method
Browse files Browse the repository at this point in the history
  • Loading branch information
willwillems committed Sep 2, 2019
1 parent 8cb3ee5 commit 0ed4887
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source-map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export interface CodeWithSourceMap {
map: SourceMapGenerator;
}

export interface SourceMapConsumerInitialisationOptions {
"lib/mappings.wasm": string;
}

export interface SourceMapConsumer {
/**
* Compute the last column for each generated mapping. The last column is
Expand Down Expand Up @@ -198,6 +202,14 @@ export interface SourceMapConsumerConstructor {
new (rawSourceMap: RawIndexMap, sourceMapUrl?: SourceMapUrl): Promise<IndexedSourceMapConsumer>;
new (rawSourceMap: RawSourceMap | RawIndexMap | string, sourceMapUrl?: SourceMapUrl): Promise<BasicSourceMapConsumer | IndexedSourceMapConsumer>;

/**
* Set URL/ArrayBuffer for `lib/mappings.wasm` when using outside of Node
*
* @param opts
* Options for initialisation containing the URL or ArrayBuffer for lib/mappings.wasm
*/
initialize(options: SourceMapConsumerInitialisationOptions): void;

/**
* Create a BasicSourceMapConsumer from a SourceMapGenerator.
*
Expand Down

0 comments on commit 0ed4887

Please sign in to comment.