Use @types/vscode-notebook-renderer

This commit is contained in:
Matt Bierner
2021-08-27 17:21:53 -07:00
parent 3ff1222366
commit 0ec3d48b70
6 changed files with 18 additions and 6 deletions

View File

@@ -3,13 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import type * as markdownIt from 'markdown-it';
import type { RendererContext } from 'vscode-notebook-renderer';
const styleHref = import.meta.url.replace(/katex.js$/, 'katex.min.css');
export async function activate(ctx: {
getRenderer: (id: string) => Promise<any | undefined>
}) {
const markdownItRenderer = await ctx.getRenderer('markdownItRenderer');
export async function activate(ctx: RendererContext<void>) {
const markdownItRenderer = (await ctx.getRenderer('markdownItRenderer')) as undefined | any;
if (!markdownItRenderer) {
throw new Error('Could not load markdownItRenderer');
}