Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/marked

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/marked - npm Package Compare versions

Comparing version 0.7.4 to 1.1.0

185

marked/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for Marked 0.7
// Type definitions for Marked 1.1
// Project: https://github.com/markedjs/marked, https://marked.js.org

@@ -9,2 +9,3 @@ // Definitions by: William Orr <https://github.com/worr>

// Ezra Celli <https://github.com/ezracelli>
// Romain LE BARO <https://github.com/scandinave>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -103,2 +104,10 @@

function walkTokens(tokens: TokensList, callback: (token: Token) => void): typeof marked;
/**
* Use Extension
* @param Renderer
*/
function use(options: MarkedOptions): void;
class InlineLexer {

@@ -119,2 +128,33 @@ constructor(links: string[], options?: MarkedOptions);

class Tokenizer {
constructor(options?: MarkedOptions);
options: MarkedOptions;
space(src: string): Tokens.Space;
code(src: string, token: Token): Tokens.Code;
fences(src: string): Tokens.Code;
heading(src: string): Tokens.Heading;
nptable(src: string): Tokens.Table;
hr(src: string): Tokens.Hr;
blockquote(src: string): Tokens.Blockquote;
list(src: string): Tokens.List;
html(src: string): Tokens.HTML;
def(src: string): Tokens.Def;
table(src: string): Tokens.Table;
lheading(src: string): Tokens.Heading;
paragraph(src: string): Tokens.Paragraph;
text(src: string): Tokens.Text;
escape(src: string): Tokens.Escape;
tag(src: string, inLink: boolean, inRawBlock: boolean): Tokens.Tag;
link(src: string): Tokens.Image | Tokens.Link;
reflink(src: string, links: Tokens.Link[] |Tokens.Image[]): Tokens.Link |Tokens.Image | Tokens.Text;
strong(src: string): Tokens.Strong;
em(src: string): Tokens.Em;
codespan(src: string): Tokens.Codespan;
br(src: string): Tokens.Br;
del(src: string): Tokens.Del;
autolink(src: string, mangle: (cap: string) => string): Tokens.Link;
url(src: string, mangle: (cap: string) => string): Tokens.Link;
inlineText(src: string, inRawBlock: boolean, smartypants: (cap: string) => string): Tokens.Text;
}
class Renderer {

@@ -157,2 +197,3 @@ constructor(options?: MarkedOptions);

br(): string;
html(text: string): string;
}

@@ -184,2 +225,3 @@

token(src: string, top: boolean): TokensList;
inline(tokens: TokensList): TokensList;
}

@@ -208,12 +250,20 @@

| Tokens.Hr
| Tokens.Blockquote
| Tokens.BlockquoteStart
| Tokens.BlockquoteEnd
| Tokens.ListStart
| Tokens.LooseItemStart
| Tokens.ListItemStart
| Tokens.ListItemEnd
| Tokens.ListEnd
| Tokens.List
| Tokens.ListItem
| Tokens.Paragraph
| Tokens.HTML
| Tokens.Text;
| Tokens.Text
| Tokens.Def
| Tokens.Escape
| Tokens.Tag
| Tokens.Image
| Tokens.Link
| Tokens.Strong
| Tokens.Em
| Tokens.Codespan
| Tokens.Br
| Tokens.Del;

@@ -223,2 +273,3 @@ namespace Tokens {

type: 'space';
raw: string;
}

@@ -228,2 +279,3 @@

type: 'code';
raw: string;
codeBlockStyle?: 'indented';

@@ -236,2 +288,3 @@ lang?: string;

type: 'heading';
raw: string;
depth: number;

@@ -243,2 +296,3 @@ text: string;

type: 'table';
raw: string;
header: string[];

@@ -251,6 +305,14 @@ align: Array<'center' | 'left' | 'right' | null>;

type: 'hr';
raw: string;
}
interface Blockquote {
type: 'blockquote';
raw: string;
text: string;
}
interface BlockquoteStart {
type: 'blockquote_start';
raw: string;
}

@@ -260,27 +322,26 @@

type: 'blockquote_end';
raw: string;
}
interface ListStart {
interface List {
type: 'list_start';
raw: string;
ordered: boolean;
start: boolean;
loose: boolean;
items: ListItem[];
}
interface LooseItemStart {
type: 'loose_item_start';
interface ListItem {
type: 'list_item';
raw: string;
task: boolean;
checked: boolean;
loose: boolean;
text: string;
}
interface ListItemStart {
type: 'list_item_start';
}
interface ListItemEnd {
type: 'list_item_end';
}
interface ListEnd {
type: 'list_end';
}
interface Paragraph {
type: 'paragraph';
raw: string;
pre?: boolean;

@@ -292,2 +353,3 @@ text: string;

type: 'html';
raw: string;
pre: boolean;

@@ -299,4 +361,71 @@ text: string;

type: 'text';
raw: string;
text: string;
}
interface Def {
raw: string;
href: string;
title: string;
}
interface Escape {
type: 'escape';
raw: string;
text: string;
}
interface Tag {
type: 'text' | 'html';
raw: string;
inLink: boolean;
inRawBlock: boolean;
text: string;
}
interface Link {
type: 'link';
raw: string;
href: string;
title: string;
text: string;
tokens?: Text[];
}
interface Image {
type: 'image';
raw: string;
href: string;
title: string;
text: string;
}
interface Strong {
type: 'strong';
raw: string;
text: string;
}
interface Em {
type: 'em';
raw: string;
text: string;
}
interface Codespan {
type: 'codespan';
raw: string;
text: string;
}
interface Br {
type: 'br';
raw: string;
}
interface Del {
type: 'del';
raw: string;
text: string;
}
}

@@ -386,2 +515,14 @@

/**
* The tokenizer defines how to turn markdown text into tokens.
*/
tokenizer?: Tokenizer;
/**
* The walkTokens function gets called with every token.
* Child tokens are called before moving on to sibling tokens.
* Each token is passed by reference so updates are persisted when passed to the parser.
* The return value of the function is ignored.
*/
walkTokens?: (tokens: TokensList, callback: (token: Token) => void) => any;
/**
* Generate closing slash for self-closing tags (<br/> instead of <br>)

@@ -388,0 +529,0 @@ */

11

marked/package.json
{
"name": "@types/marked",
"version": "0.7.4",
"version": "1.1.0",
"description": "TypeScript definitions for Marked",

@@ -36,2 +36,7 @@ "license": "MIT",

"githubUsername": "ezracelli"
},
{
"name": "Romain LE BARO",
"url": "https://github.com/scandinave",
"githubUsername": "scandinave"
}

@@ -48,4 +53,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "b839bc3b0ce904608c0e49c5987f94363e04c866b51d0fac8724656e47b57328",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "48c153587a45f60e859d3d2abac0f31b11093a4d4600b52659da4f319196eb60",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 13 Apr 2020 23:46:06 GMT
* Last updated: Mon, 22 Jun 2020 09:23:49 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), [Hitomi Hatsukaze](https://github.com/htkzhtm), and [Ezra Celli](https://github.com/ezracelli).
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), [Ezra Celli](https://github.com/ezracelli), and [Romain LE BARO](https://github.com/scandinave).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc