UNPKG

svelte-highlight

Version:

Svelte component library for highlighting code using highlight.js

34 lines (27 loc) 751 B
import type { SvelteComponentTyped } from "svelte"; import type { HTMLAttributes } from "svelte/elements"; import type { LangtagProps } from "./Highlight.svelte"; import type { LanguageName } from "./languages"; export type LangTagProps = HTMLAttributes<HTMLPreElement> & LangtagProps & { /** * Specify the text to highlight. */ code: any; /** * Provide the highlighted code. */ highlighted: string; /** * Provide the language name. * @default "plaintext" */ languageName?: LanguageName | (string & {}); }; export type LangTagEvents = {}; export type LangTagSlots = {}; export default class LangTag extends SvelteComponentTyped< LangTagProps, LangTagEvents, LangTagSlots > {}