import type { TemplateLiteral } from "estree"; import type { AstPath, Doc, Options } from "prettier"; import type { printer } from "prettier/doc"; import type { OmitIndexSignature } from "type-fest"; import type { AutocompleteStringList, EmbeddedDefaultComment, EmbeddedDefaultTag, EmbeddedLanguage, makeCommentsOptionName, makeIdentifiersOptionName, makeTagsOptionName, PluginEmbedOptions } from "./embedded/index.js"; import type { PluginEmbedLanguageAgnosticOptions } from "./options.js"; export type InternalPrintFun = (selector?: string | number | (string | number)[] | AstPath) => Doc; export interface EmbedderPayload { commentOrTag: string; kind: "comment" | "tag"; embeddedOverrideOptions: EmbeddedOverride["options"] | undefined; } export type Embedder = (textToDoc: (text: string, options: T) => Promise, print: InternalPrintFun, path: AstPath, options: T, embedderPayload: EmbedderPayload) => Promise; type EmbeddedCommentsOrTags = AutocompleteStringList; type EmbeddedComments = AutocompleteStringList; type EmbeddedTags = AutocompleteStringList; type EmbeddedOverrideOptions = Omit, keyof PluginEmbedOptions> & Omit> | ReturnType> | ReturnType>>, keyof printer.Options | "endOfLine" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>; interface EmbeddedOverrideWithIdentifiers { /** * @deprecated Please use `comments` or `tags`. */ identifiers: EmbeddedCommentsOrTags; comments?: EmbeddedComments; tags?: EmbeddedTags; options: EmbeddedOverrideOptions; } interface EmbeddedOverrideWithComments { /** * @deprecated Please use `comments` or `tags`. */ identifiers?: EmbeddedCommentsOrTags; comments: EmbeddedComments; tags?: EmbeddedTags; options: EmbeddedOverrideOptions; } interface EmbeddedOverrideWithTags { /** * @deprecated Please use `comments` or `tags`. */ identifiers?: EmbeddedCommentsOrTags; comments?: EmbeddedComments; tags: EmbeddedTags; options: EmbeddedOverrideOptions; } export type EmbeddedOverride = EmbeddedOverrideWithComments | EmbeddedOverrideWithTags | EmbeddedOverrideWithIdentifiers; export {};