/** * @file * * Pure derivation of the ECMAScript language level supported by a given * Chromium (V8) version, expressed as an ECMAScript-edition string (e.g. `'ES2022'`). * * A serialized `evalInObsidian` closure runs in Obsidian's Chromium renderer, so * the ES features it may safely use are bounded by that shell's Chromium version. * The empirically-collected `runtimeVersions.chrome` (see * {@link ObsidianRuntimeVersions} and `scripts/collect-runtime-versions.ts`) is * fed through {@link deriveEcmaScriptVersion} to bake a per-version * `ecmaScriptVersion` into `metadata.json`, so a consumer pinning an installer can * tell offline which ES level is safe. * * The Chromium-major → ES-year breakpoints below are the Chromium releases at * which each yearly ECMAScript edition became fully supported, per MDN / * caniuse / the ECMAScript compatibility tables. They are a curated table, not * derived from anything else, so this module is pure and unit-tested to the 100% gate. */ /** * Derives the highest fully-supported ECMAScript edition for a Chromium version. * * @param chromeVersion - A Chromium version string (e.g. `'114.0.5735.289'`); * only the leading major segment is significant. * @returns The ECMAScript-edition label (e.g. `'ES2022'`), or `undefined` when the * version cannot be parsed or its Chromium major predates the earliest tracked edition. */ export declare function deriveEcmaScriptVersion(chromeVersion: string): string | undefined;