strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
@@ -2,7 +2,7 @@ import { mfmLanguage } from './language';
|
||||
import { MfmForest } from './prelude';
|
||||
import { normalize } from './normalize';
|
||||
|
||||
export function parse(source: string): MfmForest {
|
||||
export function parse(source: string | null): MfmForest | null {
|
||||
if (source == null || source == '') {
|
||||
return null;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export function parse(source: string): MfmForest {
|
||||
return normalize(mfmLanguage.root.tryParse(source));
|
||||
}
|
||||
|
||||
export function parsePlain(source: string): MfmForest {
|
||||
export function parsePlain(source: string | null): MfmForest | null {
|
||||
if (source == null || source == '') {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user