diff --git a/gulp-autoprefixer/gulp-autoprefixer-tests.ts b/gulp-autoprefixer/gulp-autoprefixer-tests.ts new file mode 100644 index 0000000000..9fca0fa69c --- /dev/null +++ b/gulp-autoprefixer/gulp-autoprefixer-tests.ts @@ -0,0 +1,20 @@ +/// +/// +import gulp = require("gulp"); +import autoprefixer = require("gulp-autoprefixer"); + +gulp.src("test.css") + .pipe(autoprefixer()) + .pipe(gulp.dest("build")); + +gulp.src("test.css") + .pipe(autoprefixer({ browsers: ["Chrome"]})) + .pipe(gulp.dest("build")); + +gulp.src("test.css") + .pipe(autoprefixer({cascade: false})) + .pipe(gulp.dest("build")); + +gulp.src("test.css") + .pipe(autoprefixer({remove: false})) + .pipe(gulp.dest("build")); \ No newline at end of file diff --git a/gulp-autoprefixer/gulp-autoprefixer.d.ts b/gulp-autoprefixer/gulp-autoprefixer.d.ts new file mode 100644 index 0000000000..5abfdc6283 --- /dev/null +++ b/gulp-autoprefixer/gulp-autoprefixer.d.ts @@ -0,0 +1,18 @@ +// Type definitions for gulp-autoprefixer +// Project: https://github.com/sindresorhus/gulp-autoprefixer +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-autoprefixer" { + interface Options { + browsers?: string[]; + cascade?: boolean; + remove?: boolean; + } + + function autoPrefixer(opts?: Options): NodeJS.ReadWriteStream; + + export = autoPrefixer; +} diff --git a/gulp-gh-pages/gulp-gh-pages-tests.ts b/gulp-gh-pages/gulp-gh-pages-tests.ts new file mode 100644 index 0000000000..a8633c0519 --- /dev/null +++ b/gulp-gh-pages/gulp-gh-pages-tests.ts @@ -0,0 +1,25 @@ +/// +/// +import gulp = require("gulp"); +import ghPages = require("gulp-gh-pages"); + +gulp.src("test.css") + .pipe(ghPages()); + +gulp.src("test.css") + .pipe(ghPages({remoteUrl: "https://github.com/Asana/DefinitelyTyped.git"})); + +gulp.src("test.css") + .pipe(ghPages({origin: "origin"})); + +gulp.src("test.css") + .pipe(ghPages({branch: "master"})); + +gulp.src("test.css") + .pipe(ghPages({cacheDir: "/tmp"})); + +gulp.src("test.css") + .pipe(ghPages({push: false})); + +gulp.src("test.css") + .pipe(ghPages({message: "master"})); \ No newline at end of file diff --git a/gulp-gh-pages/gulp-gh-pages.d.ts b/gulp-gh-pages/gulp-gh-pages.d.ts new file mode 100644 index 0000000000..ef71465644 --- /dev/null +++ b/gulp-gh-pages/gulp-gh-pages.d.ts @@ -0,0 +1,21 @@ +// Type definitions for gulp-gh-pages +// Project: https://github.com/rowoot/gulp-gh-pages +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-gh-pages" { + interface Options { + remoteUrl?: string; + origin?: string; + branch?: string; + cacheDir?: string; + push?: boolean; + message?: string; + } + + function ghPages(opts?: Options): NodeJS.ReadWriteStream; + + export = ghPages; +} diff --git a/gulp-if/gulp-if-tests.ts b/gulp-if/gulp-if-tests.ts new file mode 100644 index 0000000000..e1ba54c915 --- /dev/null +++ b/gulp-if/gulp-if-tests.ts @@ -0,0 +1,10 @@ +/// +/// +import gulp = require("gulp"); +import _if = require("gulp-if"); + +gulp.src("test.css") + .pipe(_if(true, gulp.src("test.css"))); + +gulp.src("test.css") + .pipe(_if(false, gulp.src("test.css"), gulp.src("test.css"))); \ No newline at end of file diff --git a/gulp-if/gulp-if.d.ts b/gulp-if/gulp-if.d.ts new file mode 100644 index 0000000000..d73fa52e70 --- /dev/null +++ b/gulp-if/gulp-if.d.ts @@ -0,0 +1,11 @@ +// Type definitions for gulp-if +// Project: https://github.com/robrich/gulp-if +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-if" { + function gulpIf(condition: boolean, stream: NodeJS.ReadWriteStream, elseStream?: NodeJS.ReadWriteStream): NodeJS.ReadWriteStream; + export = gulpIf; +} \ No newline at end of file diff --git a/gulp-istanbul/gulp-istanbul-tests.ts b/gulp-istanbul/gulp-istanbul-tests.ts new file mode 100644 index 0000000000..7f2327d073 --- /dev/null +++ b/gulp-istanbul/gulp-istanbul-tests.ts @@ -0,0 +1,32 @@ +/// +/// +import gulp = require("gulp"); +import istanbul = require("gulp-istanbul"); + +function testFramework(): NodeJS.ReadWriteStream { + return null; +} + +gulp.task('test', function (cb) { + gulp.src(['lib/**/*.js', 'main.js']) + .pipe(istanbul()) // Covering files + .pipe(gulp.dest('test-tmp/')) + .on('finish', function () { + gulp.src(['test/*.html']) + .pipe(testFramework()) + .pipe(istanbul.writeReports()) // Creating the reports after tests runned + .on('end', cb); + }); +}); + +gulp.task('test', function (cb) { + gulp.src(['lib/**/*.js', 'main.js']) + .pipe(istanbul({includeUntested: true})) // Covering files + .pipe(istanbul.hookRequire()) + .on('finish', function () { + gulp.src(['test/*.html']) + .pipe(testFramework()) + .pipe(istanbul.writeReports({reporters: ['text']})) // Creating the reports after tests runned + .on('end', cb); + }); +}); \ No newline at end of file diff --git a/gulp-istanbul/gulp-istanbul.d.ts b/gulp-istanbul/gulp-istanbul.d.ts new file mode 100644 index 0000000000..4b03b16a67 --- /dev/null +++ b/gulp-istanbul/gulp-istanbul.d.ts @@ -0,0 +1,51 @@ +// Type definitions for gulp-istanbul +// Project: https://github.com/SBoudrias/gulp-istanbul +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-istanbul" { + function GulpIstanbul(opts?: GulpIstanbul.Options): NodeJS.ReadWriteStream; + + module GulpIstanbul { + export function hookRequire(): NodeJS.ReadWriteStream; + export function summarizeCoverage(opts?: {coverageVariable: string}): Coverage; + export function writeReports(opts?: ReportOptions): NodeJS.ReadWriteStream; + + interface Options { + coverageVariable?: string; + includeUntested?: boolean; + embedSource?: boolean; + preserveComments?: boolean; + noCompact?: boolean; + noAutoWrap?: boolean; + codeGenerationOptions?: Object; + debug?: boolean; + walkDebug?: boolean; + } + + interface Coverage { + lines: CoverageStats; + statements: CoverageStats; + functions: CoverageStats; + branches: CoverageStats; + } + + interface CoverageStats { + total: number; + covered: number; + skipped: number; + pct: number; + } + + interface ReportOptions { + dir?: string; + reporters?: string[]; + reportOpts?: {dir?: string}; + coverageVariable?: string; + } + } + + export = GulpIstanbul; +} \ No newline at end of file diff --git a/gulp-mocha/gulp-mocha-tests.ts b/gulp-mocha/gulp-mocha-tests.ts new file mode 100644 index 0000000000..09f62b83d9 --- /dev/null +++ b/gulp-mocha/gulp-mocha-tests.ts @@ -0,0 +1,9 @@ +/// +/// +import gulp = require("gulp"); +import mocha = require("gulp-mocha"); + +gulp.task('default', function () { + return gulp.src('test.js', {read: false}) + .pipe(mocha({reporter: 'nyan'})); +}); \ No newline at end of file diff --git a/gulp-mocha/gulp-mocha.d.ts b/gulp-mocha/gulp-mocha.d.ts new file mode 100644 index 0000000000..e6bc099c31 --- /dev/null +++ b/gulp-mocha/gulp-mocha.d.ts @@ -0,0 +1,12 @@ +// Type definitions for gulp-mocha +// Project: https://github.com/sindresorhus/gulp-mocha +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "gulp-mocha" { + function mocha(setupOptions: MochaSetupOptions): NodeJS.ReadWriteStream; + export = mocha; +} \ No newline at end of file diff --git a/gulp-rename/gulp-rename-tests.ts b/gulp-rename/gulp-rename-tests.ts new file mode 100644 index 0000000000..6b204a36d9 --- /dev/null +++ b/gulp-rename/gulp-rename-tests.ts @@ -0,0 +1,29 @@ +/// +/// +import gulp = require("gulp"); +import rename = require("gulp-rename"); + +// rename via string +gulp.src("./src/main/text/hello.txt") + .pipe(rename("main/text/ciao/goodbye.md")) + .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/goodbye.md + +// rename via function +gulp.src("./src/**/hello.txt") + .pipe(rename((path) => { + path.dirname += "/ciao"; + path.basename += "-goodbye"; + path.extname = ".md" + })) + .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/hello-goodbye.md + +// rename via hash +gulp.src("./src/main/text/hello.txt", { base: process.cwd() }) + .pipe(rename({ + dirname: "main/text/ciao", + basename: "aloha", + prefix: "bonjour-", + suffix: "-hola", + extname: ".md" + })) + .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md \ No newline at end of file diff --git a/gulp-rename/gulp-rename.d.ts b/gulp-rename/gulp-rename.d.ts new file mode 100644 index 0000000000..7b8960007e --- /dev/null +++ b/gulp-rename/gulp-rename.d.ts @@ -0,0 +1,20 @@ +// Type definitions for gulp-rename +// Project: https://github.com/hparra/gulp-rename +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-rename" { + interface Options { + dirname?: string; + basename?: string; + prefix?: string; + suffix?: string; + extname?: string; + } + function rename(name: string): NodeJS.ReadWriteStream; + function rename(callback: (path: Options) => any): NodeJS.ReadWriteStream; + function rename(opts: Options): NodeJS.ReadWriteStream; + export = rename; +} \ No newline at end of file diff --git a/gulp-replace/gulp-replace-tests.ts b/gulp-replace/gulp-replace-tests.ts new file mode 100644 index 0000000000..a914bfd44e --- /dev/null +++ b/gulp-replace/gulp-replace-tests.ts @@ -0,0 +1,11 @@ +/// +/// +import gulp = require("gulp"); +import replace = require("gulp-replace"); + +gulp.task('templates', function(){ + gulp.src(['file.txt']) + .pipe(replace("test", "foo")) + .pipe(replace(/foo(.{3})/g, '$1foo')) + .pipe(gulp.dest('build/file.txt')); +}); \ No newline at end of file diff --git a/gulp-replace/gulp-replace.d.ts b/gulp-replace/gulp-replace.d.ts new file mode 100644 index 0000000000..fb352ea9af --- /dev/null +++ b/gulp-replace/gulp-replace.d.ts @@ -0,0 +1,17 @@ +// Type definitions for gulp-replace +// Project: https://github.com/lazd/gulp-replace +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-replace" { + interface Options { + skipBinary: boolean; + } + + function replace(pattern: string, replacement: string, opts?: Options): NodeJS.ReadWriteStream; + function replace(pattern: RegExp, replacement: string, opts?: Options): NodeJS.ReadWriteStream; + + export = replace; +} \ No newline at end of file diff --git a/gulp-sass/gulp-sass-tests.ts b/gulp-sass/gulp-sass-tests.ts new file mode 100644 index 0000000000..b566b4cdf6 --- /dev/null +++ b/gulp-sass/gulp-sass-tests.ts @@ -0,0 +1,16 @@ +/// +/// +import gulp = require("gulp"); +import sass = require("gulp-sass"); + +gulp.task('sass', function () { + gulp.src('./scss/*.scss') + .pipe(sass()) + .pipe(gulp.dest('./css')); +}); + +gulp.task('sass', function () { + gulp.src('./scss/*.scss') + .pipe(sass({errLogToConsole: true})) + .pipe(gulp.dest('./css')); +}); \ No newline at end of file diff --git a/gulp-sass/gulp-sass.d.ts b/gulp-sass/gulp-sass.d.ts new file mode 100644 index 0000000000..8d6d4c0557 --- /dev/null +++ b/gulp-sass/gulp-sass.d.ts @@ -0,0 +1,49 @@ +// Type definitions for gulp-sass +// Project: https://github.com/dlmanning/gulp-sass +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-sass" { + interface SassResults { + css: string; + map: string; + stats: { + entry: string; + start: Date; + end: Date; + duration: number; + includedFiles: string[]; + } + } + + interface SassOptions { + file?: string; + data?: string; + success?: (results: SassResults) => any; + error?: (err: Error) => any; + includePaths?: string[]; + imagePaths?: string[]; + indentedSyntax?: boolean; + omitSourceMapUrl?: boolean; + outFile?: string; + outputStyle?: string; + precision?: number; + sourceComments?: boolean; + sourceMap?: boolean | string; + sourceMapEmbed?: boolean; + sourceMapContents?: boolean; + } + + interface Options extends SassOptions { + errLogToConsole?: boolean; + onSuccess?: (css: string) => any; + onError?: (err: Error) => any; + sync?: boolean; + } + + function sass(opts?: Options): NodeJS.ReadWriteStream; + + export = sass; +} \ No newline at end of file diff --git a/gulp-sourcemaps/gulp-sourcemaps-tests.ts b/gulp-sourcemaps/gulp-sourcemaps-tests.ts new file mode 100644 index 0000000000..bc06bbb8df --- /dev/null +++ b/gulp-sourcemaps/gulp-sourcemaps-tests.ts @@ -0,0 +1,99 @@ +/// +/// +import gulp = require("gulp"); +import sourcemaps = require("gulp-sourcemaps"); + +function plugin1(): NodeJS.ReadWriteStream { return null; } +function plugin2(): NodeJS.ReadWriteStream { return null; } + +gulp.task('javascript', function() { + gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps')) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + gulp.src('src/**/*.js') + .pipe(sourcemaps.init({loadMaps: true})) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + gulp.src(['src/test.js', 'src/testdir/test2.js'], { base: 'src' }) + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps')) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps', {addComment: false})) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write({includeContent: false, sourceRoot: '/src'})) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write({ + includeContent: false, + sourceRoot: function(file) { + return '/src'; + } + })) + .pipe(gulp.dest('dist')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps', { + sourceMappingURLPrefix: 'https://asset-host.example.com/assets' + })) + .pipe(gulp.dest('public/scripts')); +}); + +gulp.task('javascript', function() { + var stream = gulp.src('src/**/*.js') + .pipe(sourcemaps.init()) + .pipe(plugin1()) + .pipe(plugin2()) + .pipe(sourcemaps.write('../maps', { + sourceMappingURLPrefix: function(file) { + return 'https://asset-host.example.com/assets' + } + })) + .pipe(gulp.dest('public/scripts')); +}); \ No newline at end of file diff --git a/gulp-sourcemaps/gulp-sourcemaps.d.ts b/gulp-sourcemaps/gulp-sourcemaps.d.ts new file mode 100644 index 0000000000..2200853673 --- /dev/null +++ b/gulp-sourcemaps/gulp-sourcemaps.d.ts @@ -0,0 +1,28 @@ +// Type definitions for gulp-sourcemaps +// Project: https://github.com/floridoo/gulp-sourcemaps +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-sourcemaps" { + interface InitOptions { + loadMaps?: boolean; + debug?: boolean; + } + + interface WriteMapper { + (file: string): string; + } + + interface WriteOptions { + addComment?: boolean; + includeContext?: boolean; + sourceRoot?: string | WriteMapper; + sourceMappingURLPrefix?: string | WriteMapper; + } + + export function init(opts?: InitOptions): NodeJS.ReadWriteStream; + export function write(opts?: WriteOptions): NodeJS.ReadWriteStream; + export function write(path?: string, opts?: WriteOptions): NodeJS.ReadWriteStream; +} \ No newline at end of file diff --git a/gulp-tslint/gulp-tslint-tests.ts b/gulp-tslint/gulp-tslint-tests.ts new file mode 100644 index 0000000000..94834143f8 --- /dev/null +++ b/gulp-tslint/gulp-tslint-tests.ts @@ -0,0 +1,47 @@ +/// +/// +/// +import gulp = require("gulp"); +import tslint = require("gulp-tslint"); +import vinyl = require("vinyl"); + +gulp.task('tslint', function(){ + gulp.src('source.ts') + .pipe(tslint()) + .pipe(tslint.report('verbose')); +}); + +/* Output is in the following form: + * [{ + * "name": "invalid.ts", + * "failure": "missing whitespace", + * // Lines and characters start from 0 + * "startPosition": {"position": 8, "line": 0, "character": 8}, + * "endPosition": {"position": 9, "line": 0, "character": 9}, + * "ruleName": "one-line" + * }] + */ +var testReporter = function (output: tslint.Output[], file: vinyl, options: tslint.Options) { + // file is a reference to the vinyl File object + console.log("Found " + output.length + " errors in " + file.path); + // options is a reference to the reporter options, e.g. options.emitError +}; + +gulp.task('invalid-custom', function(){ + gulp.src('invalid.ts') + .pipe(tslint()) + .pipe(tslint.report(testReporter)); +}); + +gulp.task('tslint-json', function(){ + gulp.src('invalid.ts') + .pipe(tslint({ + configuration: { + rules: { + "class-name": true + // ... + } + } + })) + .pipe(tslint.report('prose'));; +}); \ No newline at end of file diff --git a/gulp-tslint/gulp-tslint.d.ts b/gulp-tslint/gulp-tslint.d.ts new file mode 100644 index 0000000000..423625ea0a --- /dev/null +++ b/gulp-tslint/gulp-tslint.d.ts @@ -0,0 +1,42 @@ +// Type definitions for gulp-tslint +// Project: https://github.com/panuhorsmalahti/gulp-tslint +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "gulp-tslint" { + import vinyl = require("vinyl"); + + function GulpTsLint(opts?: GulpTsLint.Options): NodeJS.ReadWriteStream; + + module GulpTsLint { + interface Options { + configuration?: Object; + rulesDirectory?: string; + emitError?: boolean; + } + + interface Position { + position: number; + line: number; + character: number; + } + + interface Output { + name: string; + failure: string; + startPosition: Position; + endPosition: Position; + ruleName: string; + } + + export function report(reporter?: string): NodeJS.ReadWriteStream; + export function report(reporter?: (output: Output[], file: vinyl, options: Options) => any): NodeJS.ReadWriteStream; + + } + + export = GulpTsLint; +} + diff --git a/gulp-typedoc/gulp-typedoc-tests.ts b/gulp-typedoc/gulp-typedoc-tests.ts new file mode 100644 index 0000000000..143fd776a3 --- /dev/null +++ b/gulp-typedoc/gulp-typedoc-tests.ts @@ -0,0 +1,15 @@ +/// +/// +import gulp = require("gulp"); +import typedoc = require("gulp-typedoc"); + +gulp.task("typedoc", function() { + return gulp + .src(["data/*.ts"]) + .pipe(typedoc({ + module: "commonjs", + out: "./out", + name: "my-project", + target: "es5" + })); +}); \ No newline at end of file diff --git a/gulp-typedoc/gulp-typedoc.d.ts b/gulp-typedoc/gulp-typedoc.d.ts new file mode 100644 index 0000000000..713d32bdf4 --- /dev/null +++ b/gulp-typedoc/gulp-typedoc.d.ts @@ -0,0 +1,30 @@ +// Type definitions for gulp-typedoc +// Project: https://github.com/rogierschouten/gulp-typedoc +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-typedoc" { + interface Options { + out: string; + mode?: string; + json?: string; + exclude?: string; + includeDeclarations?: boolean; + externalPattern?: string; + excludeExternals?: boolean; + module?: string; + target?: string; + theme?: string; + name?: string; + readme?: string; + hideGenerator?: boolean; + gaID?: string; + gaSite?: string; + verbose?: boolean; + } + + function typedoc(opts: Options): NodeJS.ReadWriteStream; + export = typedoc; +} \ No newline at end of file diff --git a/gulp-typescript/gulp-typescript-tests.ts b/gulp-typescript/gulp-typescript-tests.ts new file mode 100644 index 0000000000..29baf2ad2d --- /dev/null +++ b/gulp-typescript/gulp-typescript-tests.ts @@ -0,0 +1,40 @@ +/// +/// +import gulp = require("gulp"); +import typescript = require("gulp-typescript"); + +function merge(streams: NodeJS.ReadWriteStream[]): NodeJS.ReadWriteStream { + return null; +} + +gulp.task('scripts', function() { + var tsResult = gulp.src('lib/*.ts') + .pipe(typescript({ + declarationFiles: true, + noExternalResolve: true + })); + + return merge([ + tsResult.dts.pipe(gulp.dest('release/definitions')), + tsResult.js.pipe(gulp.dest('release/js'))] + ); +}); + + +var tsProject = typescript.createProject({ + declarationFiles: true, + noExternalResolve: true +}); + +gulp.task('scripts', function() { + var tsResult = gulp.src('lib/*.ts') + .pipe(typescript(tsProject)); + + return merge([ // Merge the two output streams, so this task is finished when the IO of both operations are done. + tsResult.dts.pipe(gulp.dest('release/definitions')), + tsResult.js.pipe(gulp.dest('release/js'))] + ); +}); +gulp.task('watch', ['scripts'], function() { + gulp.watch('lib/*.ts', ['scripts']); +}); \ No newline at end of file diff --git a/gulp-typescript/gulp-typescript.d.ts b/gulp-typescript/gulp-typescript.d.ts new file mode 100644 index 0000000000..bffc6acfe5 --- /dev/null +++ b/gulp-typescript/gulp-typescript.d.ts @@ -0,0 +1,38 @@ +// Type definitions for gulp-typescript +// Project: https://github.com/ivogabe/gulp-typescript +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-typescript" { + function GulpTypescript(params: GulpTypescript.Params, filters?: GulpTypescript.FilterSettings): GulpTypescript.CompilationStream; + + module GulpTypescript { + export function createProject(params: Params): Params; + export function filter(filters: FilterSettings): CompilationStream; + interface Params { + declarationFiles?: boolean; + module?: string; + noEmitOnError?: boolean; + noExternalResolve?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + removeComments?: boolean; + sourceRoot?: string; + sortOutput?: boolean; + target?: string; + } + + interface FilterSettings { + referencedFrom?: string[]; + } + + interface CompilationStream extends NodeJS.ReadWriteStream { + dts: NodeJS.ReadWriteStream; + js: NodeJS.ReadWriteStream; + } + } + + export = GulpTypescript; +} \ No newline at end of file diff --git a/vinyl-source-stream/vinyl-source-stream-tests.ts b/vinyl-source-stream/vinyl-source-stream-tests.ts new file mode 100644 index 0000000000..02b902e819 --- /dev/null +++ b/vinyl-source-stream/vinyl-source-stream-tests.ts @@ -0,0 +1,8 @@ +/// +/// +import gulp = require("gulp"); +import vinylSourceStream = require("vinyl-source-stream"); + +gulp.src("test.js") + .pipe(vinylSourceStream("foo.js")) + .pipe(gulp.dest("build")); \ No newline at end of file diff --git a/vinyl-source-stream/vinyl-source-stream.d.ts b/vinyl-source-stream/vinyl-source-stream.d.ts new file mode 100644 index 0000000000..cf5f8082a1 --- /dev/null +++ b/vinyl-source-stream/vinyl-source-stream.d.ts @@ -0,0 +1,11 @@ +// Type definitions for vinyl-source-stream +// Project: https://github.com/hughsk/vinyl-source-stream +// Definitions by: Asana +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "vinyl-source-stream" { + function vinylSourceStream(filename: string): NodeJS.ReadWriteStream; + export = vinylSourceStream; +} \ No newline at end of file