config: migrate workspace evaluation to Decodal 0.4

This commit is contained in:
2026-08-14 10:53:22 +09:00
parent 5c57e10de9
commit 1fad5fc8ed
12 changed files with 498 additions and 37 deletions
@@ -9,6 +9,8 @@ export function changes_between(base: any, candidate: any): any;
export function complete_current(entrypoint: string, source: string, utf16_offset: number, explicit: boolean): any;
export function compose_schema_bundle(contributions: any): any;
export function evaluate_current(contract: any): any;
export function evaluate_snapshot(snapshot: any, contract: any): any;
@@ -27,6 +29,7 @@ export interface InitOutput {
readonly apply_changes: (a: any) => [number, number, number];
readonly changes_between: (a: any, b: any) => [number, number, number];
readonly complete_current: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
readonly compose_schema_bundle: (a: any) => [number, number, number];
readonly evaluate_current: (a: any) => [number, number, number];
readonly evaluate_snapshot: (a: any, b: any) => [number, number, number];
readonly format_source: (a: number, b: number) => [number, number, number, number];
@@ -62,6 +62,18 @@ export function complete_current(entrypoint, source, utf16_offset, explicit) {
return takeFromExternrefTable0(ret[0]);
}
/**
* @param {any} contributions
* @returns {any}
*/
export function compose_schema_bundle(contributions) {
const ret = wasm.compose_schema_bundle(contributions);
if (ret[2]) {
throw takeFromExternrefTable0(ret[1]);
}
return takeFromExternrefTable0(ret[0]);
}
/**
* @param {any} contract
* @returns {any}
@@ -5,6 +5,7 @@ export const analyze_snapshot: (a: any, b: number, c: number, d: number, e: numb
export const apply_changes: (a: any) => [number, number, number];
export const changes_between: (a: any, b: any) => [number, number, number];
export const complete_current: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
export const compose_schema_bundle: (a: any) => [number, number, number];
export const evaluate_current: (a: any) => [number, number, number];
export const evaluate_snapshot: (a: any, b: any) => [number, number, number];
export const format_source: (a: number, b: number) => [number, number, number, number];