Merge pull request #33219 from adamzerella/types/pretty

[pretty] Add pretty typing
This commit is contained in:
Andrew Casey
2019-02-20 16:54:43 -08:00
committed by GitHub
4 changed files with 45 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for pretty 2.0
// Project: https://github.com/jonschlinkert/pretty
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface PrettyOptions {
ocd: boolean;
}
declare function pretty(str: string, options?: PrettyOptions): string;
export = pretty;
+5
View File
@@ -0,0 +1,5 @@
import pretty = require("pretty");
pretty(`<h1>nice</h1>`);
pretty(`<h1>nice</h1>`, {ocd: true});
+25
View File
@@ -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"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}