Add 'travis-fold' (#25305)

This commit is contained in:
Andy
2018-04-25 15:30:16 -07:00
committed by GitHub
parent 9bb37f0327
commit e7c97142be
4 changed files with 47 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for travis-fold 0.1
// Project: https://github.com/macbre/travis-fold
// Definitions by: Andy Hanson <https://github.com/andy-ms>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function start(group: string): string;
export function end(group: string): string;
export function wrap(group: string, content: string): string;
export function pushStart(ret: string[], group: string): void;
export function pushEnd(ret: string[], group: string): void;
export function isTravis(): boolean;
+12
View File
@@ -0,0 +1,12 @@
import { end, isTravis, pushEnd, pushStart, start } from "travis-fold";
const out: string[] = [];
pushStart(out, 'fold');
pushEnd(out, 'fold');
out.join('\n').trim(); // $ExpectType string
if (isTravis()) {
start("s"); // $ExpectType string
end("e"); // $ExpectType string
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"travis-fold-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }