Skip to content

Commit

Permalink
Make MarkdownParser.parse return type non-nullable
Browse files Browse the repository at this point in the history
FIX: Fix the type of `MarkdownParser.parse` to be non-nullable.
  • Loading branch information
BrianHung committed May 16, 2024
1 parent 2c70ea4 commit b59cda5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/from_markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class MarkdownParser {
let state = new MarkdownParseState(this.schema, this.tokenHandlers), doc
state.parseTokens(this.tokenizer.parse(text, markdownEnv))
do { doc = state.closeNode() } while (state.stack.length)
return doc || this.schema.topNodeType.createAndFill()
return doc || this.schema.topNodeType.createAndFill()!
}
}

Expand Down

0 comments on commit b59cda5

Please sign in to comment.