import type { InlangPlugin } from "@inlang/sdk"; import { PluginSettings } from "./settings.js"; declare const id = "plugin.inlang.json"; type LanguageTag = string; type LegacyPattern = Array<{ type: "Text"; value: string; } | { type: "VariableReference"; name: string; }>; type Variant = { languageTag: LanguageTag; match: string[]; pattern: LegacyPattern; }; type Message = { id: string; alias: Record; selectors: Array<{ type: "VariableReference"; name: string; }>; variants: Variant[]; }; type NodeishFilesystemSubset = { readFile(path: string): Promise; readFile(path: string, options: { encoding: "utf-8"; }): Promise; readdir: (path: string) => Promise; writeFile: (path: string, data: Uint8Array | string) => Promise; mkdir(path: string): Promise; mkdir(path: string, options: { recursive: true; }): Promise; }; type LegacyProjectSettings = { sourceLanguageTag: LanguageTag; languageTags: LanguageTag[]; modules?: string[]; }; type JsonPlugin = Omit, "loadMessages" | "saveMessages" | "addCustomApi"> & { id: string; displayName: string; description: string; loadMessages: (args: { settings: LegacyProjectSettings & { [id]: PluginSettings; }; nodeishFs: NodeishFilesystemSubset; }) => Promise; saveMessages: (args: { messages: Message[]; settings: LegacyProjectSettings & { [id]: PluginSettings; }; nodeishFs: NodeishFilesystemSubset; }) => Promise; }; export declare const plugin: JsonPlugin; export {};