diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index f97207efdf..8886195858 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -83,10 +83,12 @@ declare module 'azdata' { } export interface ICellContents { - attachments?: ICellAttachment; + attachments?: ICellAttachments; } - export type ICellAttachment = { [key: string]: { [key: string]: string } }; + export type ICellAttachments = { [key: string]: ICellAttachment }; + export type ICellAttachment = { [key: string]: string }; + } export type SqlDbType = 'BigInt' | 'Binary' | 'Bit' | 'Char' | 'DateTime' | 'Decimal' diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/interfaces.ts b/src/sql/workbench/contrib/notebook/browser/cellViews/interfaces.ts index 19bdbd0609..5b86478460 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/interfaces.ts +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/interfaces.ts @@ -34,9 +34,9 @@ export abstract class CellView extends AngularDisposable implements OnDestroy, I } export interface IMarkdownStringWithCellAttachments extends IMarkdownString { - readonly cellAttachments?: nb.ICellAttachment + readonly cellAttachments?: nb.ICellAttachments } export interface MarkdownRenderOptionsWithCellAttachments extends MarkdownRenderOptions { - readonly cellAttachments?: nb.ICellAttachment + readonly cellAttachments?: nb.ICellAttachments } diff --git a/src/sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown.ts b/src/sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown.ts index e57fef071a..a3fba2dda6 100644 --- a/src/sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown.ts +++ b/src/sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown.ts @@ -264,7 +264,7 @@ export class NotebookMarkdownRenderer { * In a cell, the above attachment would be referenced in markdown like this: * ![altText](attachment:test.png) */ -function findAttachmentIfExists(href: string, cellAttachments: nb.ICellAttachment): string { +function findAttachmentIfExists(href: string, cellAttachments: nb.ICellAttachments): string { if (href.startsWith('attachment:') && cellAttachments) { const imageName = href.replace('attachment:', ''); const imageDefinition = cellAttachments[imageName]; diff --git a/src/sql/workbench/services/notebook/browser/models/cell.ts b/src/sql/workbench/services/notebook/browser/models/cell.ts index 3756e3cee0..3596140af1 100644 --- a/src/sql/workbench/services/notebook/browser/models/cell.ts +++ b/src/sql/workbench/services/notebook/browser/models/cell.ts @@ -80,7 +80,7 @@ export class CellModel extends Disposable implements ICellModel { private _isParameter: boolean; private _onParameterStateChanged = new Emitter(); private _isInjectedParameter: boolean; - private _attachments: nb.ICellAttachment; + private _attachments: nb.ICellAttachments; constructor(cellData: nb.ICellContents, private _options: ICellModelOptions, diff --git a/src/sql/workbench/services/notebook/browser/models/modelInterfaces.ts b/src/sql/workbench/services/notebook/browser/models/modelInterfaces.ts index 2f27ddfef0..bd250a8036 100644 --- a/src/sql/workbench/services/notebook/browser/models/modelInterfaces.ts +++ b/src/sql/workbench/services/notebook/browser/models/modelInterfaces.ts @@ -530,7 +530,7 @@ export interface ICellModel { sendChangeToNotebook(change: NotebookChangeType): void; cellSourceChanged: boolean; readonly savedConnectionName: string | undefined; - readonly attachments: nb.ICellAttachment; + readonly attachments: nb.ICellAttachments; readonly currentMode: CellEditModes; }