Skip to content

Commit

Permalink
Merge pull request #106 from manuth/master
Browse files Browse the repository at this point in the history
Fix incorrect type-declaration
  • Loading branch information
valeriangalliat authored Sep 15, 2021
2 parents 5592824 + 9192928 commit 44a956e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 4 deletions.
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@
},
"peerDependencies": {
"markdown-it": "*"
},
"dependencies": {
"@types/markdown-it": "^12.2.1"
}
}
8 changes: 4 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import MarkdownIt from 'markdown-it';
import Token from 'markdown-it/lib/token';
import State from 'markdown-it/lib/rules_core/state_core';
import MarkdownIt = require('markdown-it');
import Token = require('markdown-it/lib/token');
import State = require('markdown-it/lib/rules_core/state_core');

declare namespace anchor {
export type RenderHref = (slug: string, state: State) => string;
Expand Down Expand Up @@ -62,4 +62,4 @@ declare namespace anchor {

declare function anchor(md: MarkdownIt, opts?: anchor.AnchorOptions): void;

export = anchor;
export default anchor;

0 comments on commit 44a956e

Please sign in to comment.