Added exorcist definition

This commit is contained in:
TeamworkGuy2
2016-06-20 23:20:30 +00:00
parent ff5278803b
commit 2148e9fded
2 changed files with 36 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
/// <reference path="exorcist.d.ts" />
import exorcist = require("exorcist");
module ExorcistTest {
function pullSourceMaps(srcPath: string, projRoot: string) {
exorcist(srcPath, undefined, projRoot);
exorcist(srcPath, null, projRoot, null, true);
exorcist(srcPath, null, projRoot, "./");
}
}
export = ExorcistTest;
+21
View File
@@ -0,0 +1,21 @@
// Type definitions for exorcist v3.7.x
// Project: https://github.com/substack/watchify
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../through/through.d.ts" />
declare module 'exorcist' {
import through = require("through");
/** Externalizes the source map found inside a stream to an external .map file.
* Works with both JavaScript and CSS input streams
* @param file full path to the map file to which to write the extracted source map
* @param [url] full URL to the map file, set as sourceMappingURL in the streaming output (default: file)
* @param [root] root URL for loading relative source paths, set as sourceRoot in the source map (default: "")
* @param [base] base path for calculating relative source paths (default: use absolute paths)
* @param [errorOnMissing] when truthy, causes 'error' to be emitted instead of 'missing-map' if no map was found in the stream (default: falsey)
*/
function exorcist(file: string, url?: string, root?: string, base?: string, errorOnMissing?: boolean): through.ThroughStream;
export = exorcist;
}