trusted -> isTrusted, #29076

This commit is contained in:
Johannes Rieken
2017-08-25 11:33:11 +02:00
parent 27c07934d7
commit 3ab2688b17
3 changed files with 11 additions and 11 deletions

View File

@@ -10,13 +10,13 @@ import { marked } from 'vs/base/common/marked/marked';
export interface IMarkdownString {
value: string;
trusted?: true;
isTrusted?: boolean;
}
export class MarkdownString implements IMarkdownString {
value: string;
trusted?: true;
isTrusted?: boolean;
constructor(value: string = '') {
this.value = value;
@@ -58,7 +58,7 @@ export function isMarkdownString(thing: any): thing is IMarkdownString {
return true;
} else if (typeof thing === 'object') {
return typeof (<IMarkdownString>thing).value === 'string'
&& (typeof (<IMarkdownString>thing).trusted === 'boolean' || (<IMarkdownString>thing).trusted === void 0);
&& (typeof (<IMarkdownString>thing).isTrusted === 'boolean' || (<IMarkdownString>thing).isTrusted === void 0);
}
return false;
}
@@ -83,7 +83,7 @@ function markdownStringEqual(a: IMarkdownString, b: IMarkdownString): boolean {
} else if (!a || !b) {
return false;
} else {
return a.value === b.value && a.trusted === b.trusted;
return a.value === b.value && a.isTrusted === b.isTrusted;
}
}