UNPKG

webextensions-api-mock

Version:
29 lines (28 loc) 1.57 kB
import { SchemaNamespaces } from 'webextensions-schema'; import { SchemaId, SchemaWalkerDelegate, SchemaWalkerValue } from '../walker'; export declare type OutTypeSchema = { parent: Array<string>; childTypes: Array<string>; }; export declare type OutNamespaces = Map<string, OutTypeSchema>; export declare type Imports = { [key: string]: string; }[]; export declare class NamespacesSchemaWalker implements SchemaWalkerDelegate { private outNamespaces; private imports; constructor(outNamespaces: OutNamespaces, imports: Imports); walk(schemaNamespaces: SchemaNamespaces): void; handleImport(schemaId: SchemaId, name: string): void; createNamespaceValue(schemaId: SchemaId): SchemaWalkerValue; startObjectPropertyValue(schemaId: SchemaId, out: OutTypeSchema): SchemaWalkerValue; finishObjectPropertyValue(schemaId: SchemaId, out: OutTypeSchema): SchemaWalkerValue; valueForInvalidRef(): SchemaWalkerValue; valueForCircularType(schemaId: SchemaId): SchemaWalkerValue; finishTypeValue(schemaId: SchemaId, value: unknown, out: OutTypeSchema): SchemaWalkerValue; createEnumValue(schemaId: SchemaId, type: string, choices: string[], out: SchemaWalkerValue): SchemaWalkerValue; createPlainValue(schemaId: SchemaId, type: string, isArray: boolean): SchemaWalkerValue; createEventValue(): SchemaWalkerValue; createFnValue(schemaId: SchemaId, returnValue: SchemaWalkerValue): SchemaWalkerValue; handleField(schemaId: SchemaId, name: string, value: unknown, optional: boolean, out: OutTypeSchema): void; }