Skip to content

Commit

Permalink
explicitly define type of processer is for mdast tree in type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Oct 29, 2023
1 parent 6d04abc commit 41e0b71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -62,6 +62,7 @@
"unified": "^11.0.4"
},
"dependencies": {
"@types/mdast": "^4.0.2",
"emoticon": "^4.0.1",
"mdast-util-find-and-replace": "^3.0.1",
"node-emoji": "^2.1.0"
Expand Down
3 changes: 2 additions & 1 deletion types/index.d.ts
@@ -1,6 +1,7 @@
// TypeScript Version: 4.8

import type { Plugin } from 'unified';
import type { Root } from 'mdast';

export interface RemarkEmojiOptions {
/**
Expand All @@ -26,5 +27,5 @@ export interface RemarkEmojiOptions {
emoticon?: boolean;
}

declare const plugin: Plugin<[(RemarkEmojiOptions | null | undefined)?]>;
declare const plugin: Plugin<[(RemarkEmojiOptions | null | undefined)?], Root>;
export default plugin;

0 comments on commit 41e0b71

Please sign in to comment.