@types/marked
Advanced tools
Comparing version 4.0.6 to 4.0.7
@@ -18,2 +18,11 @@ // Type definitions for Marked 4.0 | ||
/** | ||
* Compiles markdown to HTML asynchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param options Hash of options, having async: true | ||
* @return Promise of string of compiled HTML | ||
*/ | ||
export function marked(src: string, options: marked.MarkedOptions & {async: true}): Promise<string>; | ||
/** | ||
* Compiles markdown to HTML synchronously. | ||
@@ -28,3 +37,3 @@ * | ||
/** | ||
* Compiles markdown to HTML asynchronously. | ||
* Compiles markdown to HTML asynchronously with a callback. | ||
* | ||
@@ -37,3 +46,3 @@ * @param src String of markdown source to be compiled | ||
/** | ||
* Compiles markdown to HTML asynchronously. | ||
* Compiles markdown to HTML asynchronously with a callback. | ||
* | ||
@@ -73,13 +82,31 @@ * @param src String of markdown source to be compiled | ||
*/ | ||
function parse(src: string, callback: (error: any, parseResult: string) => void): string; | ||
function parse(src: string, callback: (error: any, parseResult: string) => void): void; | ||
/** | ||
* Compiles markdown to HTML. | ||
* Compiles markdown to HTML asynchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param options Hash of options | ||
* @param options Hash of options having async: true | ||
* @return Promise of string of compiled HTML | ||
*/ | ||
function parse(src: string, options: MarkedOptions & {async: true}): Promise<string>; | ||
/** | ||
* Compiles markdown to HTML synchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param options Optional hash of options | ||
* @return String of compiled HTML | ||
*/ | ||
function parse(src: string, options?: MarkedOptions): string; | ||
/** | ||
* Compiles markdown to HTML synchronously. | ||
* | ||
* @param src String of markdown source to be compiled | ||
* @param options Optional hash of options | ||
* @param callback Function called when the markdownString has been fully parsed when using async highlighting | ||
* @return String of compiled HTML | ||
*/ | ||
function parse(src: string, options?: MarkedOptions, callback?: (error: any, parseResult: string) => void): string; | ||
function parse(src: string, options: MarkedOptions, callback: (error: any, parseResult: string) => void): void; | ||
@@ -487,2 +514,7 @@ /** | ||
/** | ||
* True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string. | ||
*/ | ||
async?: boolean; | ||
/** | ||
* A prefix URL for any relative link. | ||
@@ -489,0 +521,0 @@ */ |
{ | ||
"name": "@types/marked", | ||
"version": "4.0.6", | ||
"version": "4.0.7", | ||
"description": "TypeScript definitions for Marked", | ||
@@ -78,4 +78,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/marked", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "8e3a74062ba105244ff88cd71b77b1a978ad45841c66e8fd1c42396132f51538", | ||
"typeScriptVersion": "4.0", | ||
"typesPublisherContentHash": "5d363282ba7b6371122dcb25bc6ab9dcd441fc565c6028931e96449d1b0149fe", | ||
"typeScriptVersion": "4.1", | ||
"exports": { | ||
@@ -82,0 +82,0 @@ ".": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 21 Aug 2022 19:02:30 GMT | ||
* Last updated: Wed, 07 Sep 2022 20:32:43 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
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
25525
554