mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 10:40:41 +00:00
better isNotebookCellOutputItem-check
This commit is contained in:
parent
7ad261890f
commit
69108a528a
|
@ -3078,7 +3078,13 @@ export class NotebookData {
|
|||
export class NotebookCellOutputItem {
|
||||
|
||||
static isNotebookCellOutputItem(obj: unknown): obj is vscode.NotebookCellOutputItem {
|
||||
return obj instanceof NotebookCellOutputItem;
|
||||
if (obj instanceof NotebookCellOutputItem) {
|
||||
return true;
|
||||
}
|
||||
if (!obj) {
|
||||
return false;
|
||||
}
|
||||
return typeof (<vscode.NotebookCellOutputItem>obj).mime === 'string';
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
|
Loading…
Reference in a new issue