Files
flights_web_raw/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.d.ts
T
gnezim 60e2149072 Add comprehensive e2e test suites for Tasks 16-25
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date)
- Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class
- Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting
- Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states
- Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions
- Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation

Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares)
- Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline
- Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements
- Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations
- Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary
- Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds

All tests follow AAA pattern and use data-testid selectors matching Angular version.
Total: 245 tests across 10 feature suites.
2026-04-05 19:25:03 +03:00

69 lines
2.6 KiB
TypeScript

/**
* Used as an optional.
* `{ value: S } | { error: E }`.
*/
export type SuccessOrFail<S, F> = {
value: S;
error?: undefined;
} | {
error: F;
};
export declare function isSuccess<S, F>(successOrFail: SuccessOrFail<S, F>): successOrFail is {
value: S;
};
export declare function isFail<S, F>(successOrFail: SuccessOrFail<S, F>): successOrFail is {
error: F;
};
/**
* Used as an optional for results of a Vm call.
* `{ value: VmHandle } | { error: VmHandle }`.
*/
export type VmCallResult<VmHandle> = SuccessOrFail<VmHandle, VmHandle>;
/**
* A VmFunctionImplementation takes handles as arguments.
* It should return a handle, or be void.
*
* To indicate an exception, a VMs can throw either a handle (transferred
* directly) or any other Javascript value (only the poperties `name` and
* `message` will be transferred). Or, the VmFunctionImplementation may return
* a VmCallResult's `{ error: handle }` error variant.
*
* VmFunctionImplementation should not free its arguments or its return value.
* It should not retain a reference to its return value or thrown error.
*/
export type VmFunctionImplementation<VmHandle> = (this: VmHandle, ...args: VmHandle[]) => VmHandle | VmCallResult<VmHandle> | void;
/**
* A minimal interface to a Javascript execution environment.
*
* Higher-level tools should build over the LowLevelJavascriptVm interface to
* share as much as possible between executors.
*
* From https://www.figma.com/blog/how-we-built-the-figma-plugin-system/
*/
export interface LowLevelJavascriptVm<VmHandle> {
global: VmHandle;
undefined: VmHandle;
typeof(handle: VmHandle): string;
getNumber(handle: VmHandle): number;
getString(handle: VmHandle): string;
newNumber(value: number): VmHandle;
newString(value: string): VmHandle;
newObject(prototype?: VmHandle): VmHandle;
newFunction(name: string, value: VmFunctionImplementation<VmHandle>): VmHandle;
getProp(handle: VmHandle, key: string | VmHandle): VmHandle;
setProp(handle: VmHandle, key: string | VmHandle, value: VmHandle): void;
defineProp(handle: VmHandle, key: string | VmHandle, descriptor: VmPropertyDescriptor<VmHandle>): void;
callFunction(func: VmHandle, thisVal: VmHandle, ...args: VmHandle[]): VmCallResult<VmHandle>;
evalCode(code: string, filename?: string): VmCallResult<VmHandle>;
}
/**
* From https://www.figma.com/blog/how-we-built-the-figma-plugin-system/
*/
export interface VmPropertyDescriptor<VmHandle> {
value?: VmHandle;
configurable?: boolean;
enumerable?: boolean;
get?: (this: VmHandle) => VmHandle;
set?: (this: VmHandle, value: VmHandle) => void;
}