@types/marked
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -8,2 +8,3 @@ // Type definitions for Marked 0.7 | ||
// Hitomi Hatsukaze <https://github.com/htkzhtm> | ||
// Ezra Celli <https://github.com/ezracelli> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -15,19 +16,26 @@ | ||
/** | ||
* Compiles markdown to HTML. | ||
* Compiles markdown to HTML synchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param callback Function called when the markdownString has been fully parsed when using async highlighting | ||
* @param options Optional hash of options | ||
* @return String of compiled HTML | ||
*/ | ||
declare function marked(src: string, callback: (error: any | undefined, parseResult: string) => void): string; | ||
declare function marked(src: string, options?: marked.MarkedOptions): string; | ||
/** | ||
* Compiles markdown to HTML. | ||
* Compiles markdown to HTML asynchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param callback Function called when the markdownString has been fully parsed when using async highlighting | ||
*/ | ||
declare function marked(src: string, callback: (error: any | undefined, parseResult: string) => void): void; | ||
/** | ||
* Compiles markdown to HTML asynchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param options Hash of options | ||
* @param callback Function called when the markdownString has been fully parsed when using async highlighting | ||
* @return String of compiled HTML | ||
*/ | ||
declare function marked(src: string, options?: marked.MarkedOptions, callback?: (error: any | undefined, parseResult: string) => void): string; | ||
declare function marked(src: string, options: marked.MarkedOptions, callback: (error: any | undefined, parseResult: string) => void): void; | ||
@@ -311,5 +319,8 @@ declare namespace marked { | ||
/** | ||
* A function to highlight code blocks. The function takes three arguments: code, lang, and callback. | ||
* A function to highlight code blocks. The function can either be | ||
* synchronous (returning a string) or asynchronous (callback invoked | ||
* with an error if any occurred during highlighting and a string | ||
* if highlighting was successful) | ||
*/ | ||
highlight?(code: string, lang: string, callback?: (error: any | undefined, code: string) => void): string; | ||
highlight?(code: string, lang: string, callback?: (error: any | undefined, code?: string) => void): string | void; | ||
@@ -316,0 +327,0 @@ /** |
{ | ||
"name": "@types/marked", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "TypeScript definitions for Marked", | ||
@@ -31,2 +31,7 @@ "license": "MIT", | ||
"githubUsername": "htkzhtm" | ||
}, | ||
{ | ||
"name": "Ezra Celli", | ||
"url": "https://github.com/ezracelli", | ||
"githubUsername": "ezracelli" | ||
} | ||
@@ -43,4 +48,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "0f1d19fbd18900360e6787b336bde0677ce17d35a173ff22e7885ed6fec8a40e", | ||
"typesPublisherContentHash": "1abe4487a984f9f613f85b09bd947c02106eedeef4b46386b30b15423ffed07c", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 18 Nov 2019 22:04:56 GMT | ||
* Last updated: Thu, 05 Mar 2020 02:32:05 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: `marked` | ||
# Credits | ||
These definitions were written by William Orr (https://github.com/worr), BendingBender (https://github.com/BendingBender), CrossR (https://github.com/CrossR), Mike Wickett (https://github.com/mwickett), and Hitomi Hatsukaze (https://github.com/htkzhtm). | ||
These definitions were written by [William Orr](https://github.com/worr), [BendingBender](https://github.com/BendingBender), [CrossR](https://github.com/CrossR), [Mike Wickett](https://github.com/mwickett), [Hitomi Hatsukaze](https://github.com/htkzhtm), and [Ezra Celli](https://github.com/ezracelli). |
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
14331
322