UNPKG

@ts-for-gir/lib

Version:

Typescript .d.ts generator from GIR for gjs

61 lines (60 loc) 2.59 kB
import { TypeExpression } from "../gir.js"; import { IntrospectedBase, IntrospectedClassMember, Options } from "./base.js"; import { GirFieldElement, GirPropertyElement } from "../index.js"; import { FormatGenerator } from "../generators/generator.js"; import { GirVisitor } from "../visitor.js"; import { IntrospectedBaseClass } from "./class.js"; import { IntrospectedEnum } from "./enum.js"; import type { OptionsLoad } from "../types/index.js"; export declare class IntrospectedField extends IntrospectedClassMember { type: TypeExpression; optional: boolean; computed: boolean; isStatic: boolean; writable: boolean; isNative: boolean; copy(options?: { parent?: IntrospectedBaseClass; type?: TypeExpression; isStatic?: boolean; }): IntrospectedField; constructor({ name, parent, type, computed, optional, isStatic, writable, ...args }: Options<{ name: string; parent?: IntrospectedBaseClass | null; type: TypeExpression; computed?: boolean; optional?: boolean; isStatic?: boolean; writable?: boolean; }>); asString<T extends FormatGenerator<unknown>>(generator: T): ReturnType<T["generateField"]>; accept(visitor: GirVisitor): IntrospectedField; static fromXML(field: GirFieldElement, parent: IntrospectedBaseClass): IntrospectedField; } export declare class JSField extends IntrospectedField { isNative: boolean; } export declare class IntrospectedProperty extends IntrospectedBase<IntrospectedEnum | IntrospectedBaseClass> { type: TypeExpression; readonly writable: boolean; readonly readable: boolean; readonly constructOnly: boolean; get namespace(): import("./namespace.js").IntrospectedNamespace; copy(options?: { name?: string; parent?: IntrospectedBaseClass | IntrospectedEnum; type?: TypeExpression; }): IntrospectedProperty; accept(visitor: GirVisitor): IntrospectedProperty; constructor({ name, type, writable, readable, constructOnly, parent, ...args }: Options<{ name: string; type: TypeExpression; writable: boolean; readable: boolean; constructOnly: boolean; parent: IntrospectedBaseClass | IntrospectedEnum; }>); asString<T extends FormatGenerator<unknown>>(generator: T, construct?: boolean): ReturnType<T["generateProperty"]>; toCamelCase(): IntrospectedProperty; static fromXML(element: GirPropertyElement, parent: IntrospectedBaseClass | IntrospectedEnum, options: OptionsLoad): IntrospectedProperty; }