-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add d.ts for the main converter function to support TypeScript
Closes #9
- Loading branch information
1 parent
5b75aeb
commit 5c42d89
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
"remark", | ||
"unified" | ||
], | ||
"types": "types/index.d.ts", | ||
"author": "Skoropad Aleksandr <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export type UnsupportedTagsStrategy = 'escape' | 'remove' | 'keep' | ||
|
||
declare module 'telegramify-markdown' { | ||
|
||
/** | ||
* Converts markdown to Telegram's format. | ||
* @param markdown The markdown to convert. | ||
* @param unsupportedTagsStrategy The strategy to use for unsupported tags. | ||
*/ | ||
function convert(markdown: string, unsupportedTagsStrategy: UnsupportedTagsStrategy): string | ||
|
||
export = convert | ||
} |