Skip to content

Commit

Permalink
tighten up types
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 29, 2024
1 parent 1786df3 commit 07de2cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/site-kit/src/lib/markdown/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ export async function render_content_markdown(
const cached_snippet = SNIPPET_CACHE.get(source + language + current);
if (cached_snippet.code) return cached_snippet.code;

/** @type {SnippetOptions} */
const options = { file: null, link: null, copy: true };
const options: SnippetOptions = { file: null, link: null, copy: true };

source = collect_options(source, options);
source = adjust_tab_indentation(source, language);

let version_class = '';
let version_class: 'ts-version' | 'js-version' | '' = '';
if (/^generated-(ts|svelte)$/.test(language)) {
language = language.replace('generated-', '');
version_class = 'ts-version';
Expand Down

0 comments on commit 07de2cc

Please sign in to comment.