diff --git a/types/pretty/index.d.ts b/types/pretty/index.d.ts new file mode 100644 index 0000000000..a1bdfcb5a7 --- /dev/null +++ b/types/pretty/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for pretty 2.0 +// Project: https://github.com/jonschlinkert/pretty +// Definitions by: Adam Zerella +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface PrettyOptions { + ocd: boolean; +} + +declare function pretty(str: string, options?: PrettyOptions): string; + +export = pretty; diff --git a/types/pretty/pretty-tests.ts b/types/pretty/pretty-tests.ts new file mode 100644 index 0000000000..0fe99519b4 --- /dev/null +++ b/types/pretty/pretty-tests.ts @@ -0,0 +1,5 @@ +import pretty = require("pretty"); + +pretty(`

nice

`); + +pretty(`

nice

`, {ocd: true}); diff --git a/types/pretty/tsconfig.json b/types/pretty/tsconfig.json new file mode 100644 index 0000000000..b46d610e45 --- /dev/null +++ b/types/pretty/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [ + + ], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pretty-tests.ts" + ] +} diff --git a/types/pretty/tslint.json b/types/pretty/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/pretty/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file