@types/json2md
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -46,3 +46,3 @@ // Type definitions for json2md 1.5 | ||
interface CodeInput { | ||
language?: string; | ||
language?: string | undefined; | ||
content: string | string[]; | ||
@@ -49,0 +49,0 @@ } |
{ | ||
"name": "@types/json2md", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "TypeScript definitions for json2md", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json2md", | ||
"license": "MIT", | ||
@@ -9,15 +10,17 @@ "contributors": [ | ||
"name": "MartynasZilinskas", | ||
"url": "https://github.com/MartynasZilinskas" | ||
"url": "https://github.com/MartynasZilinskas", | ||
"githubUsername": "MartynasZilinskas" | ||
} | ||
], | ||
"main": "", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/json2md" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "6586c87d48754c194aaea83250dce3e8595121b5ed44f8fdd0a1328b573496b9", | ||
"typeScriptVersion": "2.3" | ||
"typesPublisherContentHash": "0b4c13801631f2ee76731f46d913e78bafcbecabe3022bd7bb144aef17a9563b", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -8,6 +8,75 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json2md | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json2md. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json2md/index.d.ts) | ||
````ts | ||
// Type definitions for json2md 1.5 | ||
// Project: https://github.com/IonicaBizau/json2md#readme | ||
// Definitions by: MartynasZilinskas <https://github.com/MartynasZilinskas> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
Additional Details | ||
* Last updated: Fri, 14 Jul 2017 14:13:25 GMT | ||
export = json2md; | ||
/** | ||
* Converts a JSON input to markdown. | ||
* | ||
* @param data The input JSON data. | ||
* @param prefix A snippet to add before each line. | ||
* @return The generated markdown result. | ||
*/ | ||
declare function json2md(data: json2md.DataObject | json2md.DataObject[] | string | string[], prefix?: string): string; | ||
type json2md = typeof json2md; | ||
declare namespace json2md { | ||
const converters: ConvertersMethods; | ||
namespace DefaultConverters { | ||
interface Converters { | ||
[converter: string]: any; | ||
blockquote: string | string[]; | ||
code: CodeInput; | ||
h1: string | string[]; | ||
h2: string | string[]; | ||
h3: string | string[]; | ||
h4: string | string[]; | ||
h5: string | string[]; | ||
h6: string | string[]; | ||
img: ImgInput | ImgInput[]; | ||
ol: string[]; | ||
p: string | string[]; | ||
table: TableInput; | ||
ul: string[]; | ||
} | ||
interface ImgInput { | ||
title: string; | ||
source: string; | ||
} | ||
interface CodeInput { | ||
language?: string | undefined; | ||
content: string | string[]; | ||
} | ||
interface TableInput { | ||
headers: string[]; | ||
rows: Array<{ [column: string]: string }> | string[][]; | ||
} | ||
} | ||
type DataObject = { | ||
[TConverter in keyof DefaultConverters.Converters]?: DefaultConverters.Converters[TConverter] | ||
}; | ||
type ConverterCallback<TInput> = (input: TInput, json2md: json2md) => string; | ||
type ConvertersMethods = { | ||
[TConverter in keyof DefaultConverters.Converters]: ConverterCallback<DefaultConverters.Converters[TConverter]> | ||
}; | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Thu, 08 Jul 2021 16:22:52 GMT | ||
* Dependencies: none | ||
@@ -17,2 +86,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by MartynasZilinskas <https://github.com/MartynasZilinskas>. | ||
These definitions were written by [MartynasZilinskas](https://github.com/MartynasZilinskas). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6548
0
86