mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Improve type safety by strongly-typing the micromark token type property everywhere.
This commit is contained in:
parent
828ae3541a
commit
28e1b23955
7 changed files with 106 additions and 50 deletions
|
|
@ -277,7 +277,7 @@ module.exports.fencedCodeBlockStyleFor =
|
|||
* Return the string representation of a emphasis or strong markup character.
|
||||
*
|
||||
* @param {string} markup Emphasis or strong string.
|
||||
* @returns {string} String representation.
|
||||
* @returns {"asterisk" | "underscore"} String representation.
|
||||
*/
|
||||
module.exports.emphasisOrStrongStyleFor =
|
||||
function emphasisOrStrongStyleFor(markup) {
|
||||
|
|
@ -316,7 +316,7 @@ module.exports.headingStyleFor = function headingStyleFor(token) {
|
|||
* Return the string representation of an unordered list marker.
|
||||
*
|
||||
* @param {Object} token MarkdownItToken instance.
|
||||
* @returns {string} String representation.
|
||||
* @returns {"asterisk" | "dash" | "plus"} String representation.
|
||||
*/
|
||||
module.exports.unorderedListStyleFor = function unorderedListStyleFor(token) {
|
||||
switch (token.markup) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue