@gi.ts/parser
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -9,2 +9,3 @@ "use strict"; | ||
attrNodeName: "$", | ||
textNodeName: "_", | ||
ignoreAttributes: false, | ||
@@ -11,0 +12,0 @@ ignoreNameSpace: false, |
@@ -1,160 +0,293 @@ | ||
declare type Version = string; | ||
declare type ParameterContainer<T> = [ | ||
{ | ||
parameter?: T[]; | ||
} | ||
]; | ||
export declare type binary = "0" | "1"; | ||
export declare type Element<T> = { | ||
$: T & { | ||
introspectable?: binary; | ||
}; | ||
}; | ||
export declare enum Direction { | ||
In = "in", | ||
Inout = "inout", | ||
Out = "out" | ||
} | ||
export interface GirXML { | ||
repository: Repository[]; | ||
} | ||
export interface SourcePositionElement extends Element<SourcePosition> { | ||
declare type UnparsedNumber = string; | ||
declare type BinaryOption = "0" | "1"; | ||
export interface Repository { | ||
$: { | ||
version?: string; | ||
"c:identifier-prefixes"?: string; | ||
"c:symbol-prefixes"?: string; | ||
}; | ||
include: Include[]; | ||
"c:include": CInclude[]; | ||
package: Package[]; | ||
namespace: Namespace[]; | ||
} | ||
export interface CIncludeElement extends Element<CInclude> { | ||
export interface Namespace { | ||
$: InfoAttrs & { | ||
name: string; | ||
version: string; | ||
"c:identifier-prefixes"?: string; | ||
"c:symbol-prefixes"?: string; | ||
"c:prefix"?: string; | ||
"shared-library"?: string; | ||
}; | ||
alias?: AliasElement[]; | ||
class?: ClassElement[]; | ||
interface?: InterfaceElement[]; | ||
record?: RecordElement[]; | ||
enumeration?: EnumElement[]; | ||
function?: FunctionElement[]; | ||
union?: UnionElement[]; | ||
bitfield?: BitfieldElement[]; | ||
callback?: CallbackElement[]; | ||
constant?: ConstantElement[]; | ||
annotation?: Annotation[]; | ||
["glib:boxed"]?: BoxedElement[]; | ||
} | ||
export interface Repository extends Element<RepositoryMeta> { | ||
include: Element<Include>[]; | ||
package: CIncludeElement[]; | ||
"c:include": CIncludeElement[]; | ||
namespace: NamespaceElement[]; | ||
export interface Annotation { | ||
$: { | ||
name: string; | ||
value: string[]; | ||
}; | ||
} | ||
export interface CInclude { | ||
name: string; | ||
$: { | ||
name: string; | ||
}; | ||
} | ||
export interface RepositoryMeta { | ||
version: string; | ||
xmlns: string; | ||
"xmlns:c": string; | ||
"xmlns:glib": string; | ||
} | ||
export interface Include { | ||
name: string; | ||
version: string; | ||
$: { | ||
name: string; | ||
version?: string; | ||
}; | ||
} | ||
export interface NamespaceElement extends Element<Namespace> { | ||
alias: AliasElement[]; | ||
class: ClassElement[]; | ||
record: RecordElement[]; | ||
union: RecordElement[]; | ||
bitfield: BitfieldElement[]; | ||
callback: Callback[]; | ||
interface: InterfaceElement[]; | ||
enumeration: Enumeration[]; | ||
constant: ConstantElement[]; | ||
function: Function[]; | ||
["glib:boxed"]: GLibBoxedElement[]; | ||
export interface Package { | ||
$: { | ||
name: string; | ||
}; | ||
} | ||
export interface GLibBoxedElement extends Element<GLibBoxed> { | ||
export interface AliasElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"c:type": string; | ||
}; | ||
type: Type[]; | ||
} | ||
export interface GLibBoxed { | ||
"glib:name": string; | ||
"c:symbol-prefix"?: string; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
export interface InterfaceElement extends InfoElements { | ||
$: { | ||
name: string; | ||
"glib:type-name": string; | ||
"glib:get-type": string; | ||
"c:symbol-prefix"?: string; | ||
"c:type"?: string; | ||
"glib:type-struct"?: string; | ||
}; | ||
prerequisite?: Prerequisite[]; | ||
implements?: Implements[]; | ||
function?: FunctionElement[]; | ||
constructors?: ConstructorElement[]; | ||
method?: MethodElement[]; | ||
"virtual-method"?: VirtualMethodElement[]; | ||
field?: FieldElement[]; | ||
property?: PropertyElement[]; | ||
signal?: SignalElement[]; | ||
callback?: CallbackElement[]; | ||
constant?: ConstantElement[]; | ||
} | ||
export interface Namespace { | ||
name: string; | ||
version: Version; | ||
"shared-library": string; | ||
"c:identifier-prefixes": string; | ||
"c:symbol-prefixes": string; | ||
export interface ClassElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"glib:type-name": string; | ||
"glib:get-type": string; | ||
parent?: string; | ||
"glib:type-struct"?: string; | ||
"glib:ref-func"?: string; | ||
"glib:unref-func"?: string; | ||
"glib:set-value-func"?: string; | ||
"glib:get-value-func"?: string; | ||
"c:type"?: string; | ||
"c:symbol-prefix"?: string; | ||
abstract?: BinaryOption | BinaryOption; | ||
"glib:fundamental"?: BinaryOption | BinaryOption; | ||
}; | ||
implements?: Implements[]; | ||
"constructor"?: ConstructorElement[]; | ||
method?: MethodElement[]; | ||
function?: FunctionElement[]; | ||
"virtual-method"?: VirtualMethodElement[]; | ||
field?: FieldElement[]; | ||
property?: PropertyElement[]; | ||
signal?: SignalElement[]; | ||
union?: UnionElement[]; | ||
constant?: ConstantElement[]; | ||
record?: RecordElement[]; | ||
callback?: CallbackElement[]; | ||
} | ||
export interface AliasElement extends Element<Alias> { | ||
doc?: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
type: AliasType[]; | ||
export interface BoxedElement { | ||
$: InfoAttrs & { | ||
"glib:name": string; | ||
"c:symbol-prefix"?: string; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
}; | ||
function?: FunctionElement[]; | ||
} | ||
export interface Alias { | ||
name?: string; | ||
"c:type"?: string; | ||
export interface RecordElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"c:type"?: string; | ||
disguised?: BinaryOption | BinaryOption; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
"c:symbol-prefix"?: string; | ||
foreign?: BinaryOption | BinaryOption; | ||
"glib:is-gtype-struct-for"?: string; | ||
}; | ||
field?: FieldElement[]; | ||
function?: FunctionElement[]; | ||
union?: UnionElement[]; | ||
method?: MethodElement[]; | ||
"constructor"?: ConstructorElement[]; | ||
property?: PropertyElement[]; | ||
} | ||
export interface DocElement extends Element<Doc> { | ||
_: string; | ||
export interface InfoAttrs { | ||
introspectable?: BinaryOption | BinaryOption; | ||
deprecated?: string; | ||
"deprecated-version"?: string; | ||
version?: string; | ||
stability?: string[]; | ||
} | ||
export interface Doc { | ||
"xml:space": XMLSpace; | ||
filename: string; | ||
line: string; | ||
export interface DocElement { | ||
"doc-version"?: [ | ||
{ | ||
$: { | ||
"xml:space"?: "preserve"; | ||
"xml:whitespace"?: "preserve"; | ||
}; | ||
_: string; | ||
} | ||
]; | ||
"doc-stability"?: [ | ||
{ | ||
$: { | ||
"xml:space"?: "preserve"; | ||
"xml:whitespace"?: "preserve"; | ||
}; | ||
_: string; | ||
} | ||
]; | ||
doc: [ | ||
{ | ||
$: { | ||
"xml:space"?: "preserve"; | ||
"xml:whitespace"?: "preserve"; | ||
filename: string; | ||
line: string; | ||
column: string; | ||
}; | ||
_: string; | ||
} | ||
]; | ||
"doc-deprecated": [ | ||
{ | ||
$: { | ||
"xml:space"?: "preserve"; | ||
"xml:whitespace"?: "preserve"; | ||
}; | ||
_: string; | ||
} | ||
]; | ||
"source-position": [ | ||
{ | ||
filename: string; | ||
line: string; | ||
column: string[]; | ||
} | ||
]; | ||
} | ||
export declare enum XMLSpace { | ||
Preserve = "preserve" | ||
export interface InfoElements extends DocElement { | ||
annotation: Annotation[]; | ||
} | ||
export interface SourcePosition { | ||
filename: string; | ||
line: string; | ||
export interface ConstantElement extends InfoElements, AnyType { | ||
$: InfoAttrs & { | ||
name: string; | ||
value: string; | ||
"c:type"?: string; | ||
"c:identifier"?: string; | ||
}; | ||
} | ||
export interface AliasType extends Element<Alias> { | ||
export interface PropertyElement extends InfoElements, AnyType { | ||
$: InfoAttrs & { | ||
name: string; | ||
writable?: BinaryOption | BinaryOption; | ||
readable?: BinaryOption | BinaryOption; | ||
construct?: BinaryOption | BinaryOption; | ||
"construct-only"?: BinaryOption | BinaryOption; | ||
TransferOwnership?: any; | ||
}; | ||
} | ||
export interface BitfieldElement extends Element<Bitfield> { | ||
doc?: DocElement[]; | ||
member: MemberElement[]; | ||
export interface SignalElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
detailed?: BinaryOption | BinaryOption; | ||
when?: "first" | "last" | "cleanup"; | ||
action?: BinaryOption | BinaryOption; | ||
"no-hooks"?: BinaryOption | BinaryOption; | ||
"no-recurse"?: BinaryOption | BinaryOption; | ||
}; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface Bitfield { | ||
name: string; | ||
"glib:type-name": string; | ||
"glib:get-type": string; | ||
"c:type": string; | ||
version?: Version; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
"glib:error-domain"?: string; | ||
export interface FieldElement extends InfoElements, AnyType { | ||
$: InfoAttrs & { | ||
name: string; | ||
writable?: BinaryOption | BinaryOption; | ||
readable?: BinaryOption | BinaryOption; | ||
private?: BinaryOption | BinaryOption; | ||
bits?: UnparsedNumber; | ||
}; | ||
callback?: CallbackElement[]; | ||
} | ||
export interface MemberElement extends Element<Member> { | ||
doc?: DocElement[]; | ||
export interface CallbackElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"c:type"?: string; | ||
throws?: BinaryOption | BinaryOption; | ||
}; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface Member { | ||
name: string; | ||
value: string; | ||
"c:identifier": string; | ||
"glib:nick": string; | ||
export interface Implements { | ||
$: InfoAttrs & { | ||
name: string; | ||
}; | ||
} | ||
export interface Callback extends Element<Constant> { | ||
"source-position": SourcePositionElement[]; | ||
"return-value": FunctionReturnValue[]; | ||
parameters: ParameterContainer<CallbackParameter>; | ||
doc?: DocElement[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
export interface Prerequisite { | ||
$: InfoAttrs & { | ||
name: string; | ||
}; | ||
} | ||
export interface Constant { | ||
name: string; | ||
"c:type": string; | ||
version?: Version; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
throws?: string; | ||
value?: string; | ||
export interface AnyType { | ||
type?: Type[]; | ||
array?: ArrayType[]; | ||
} | ||
export interface CallbackParameter extends Element<Parameter> { | ||
type?: AliasType[]; | ||
doc?: DocElement[]; | ||
array?: Arrays[]; | ||
export interface Type extends DocElement { | ||
$: InfoAttrs & { | ||
name?: string; | ||
"c:type"?: string; | ||
introspectable?: BinaryOption | BinaryOption; | ||
}; | ||
array?: ArrayType[]; | ||
type: Type[]; | ||
} | ||
export interface Parameter { | ||
name: string; | ||
"transfer-ownership": TransferOwnership; | ||
nullable?: string; | ||
"allow-none"?: string; | ||
closure?: string; | ||
direction?: Direction; | ||
"caller-allocates"?: string; | ||
scope?: Scope; | ||
optional?: string; | ||
destroy?: string; | ||
export interface ArrayType { | ||
$: InfoAttrs & { | ||
name?: string; | ||
"zero-terminated"?: BinaryOption | BinaryOption; | ||
"fixed-size"?: UnparsedNumber; | ||
introspectable?: BinaryOption | BinaryOption; | ||
length?: UnparsedNumber; | ||
"c:type"?: string; | ||
}; | ||
array?: ArrayType[]; | ||
type?: Type[]; | ||
} | ||
export declare enum Direction { | ||
In = "in", | ||
Inout = "inout", | ||
Out = "out" | ||
} | ||
export declare enum Scope { | ||
Async = "async", | ||
Call = "call", | ||
Notified = "notified" | ||
} | ||
export declare enum TransferOwnership { | ||
export declare enum TransferOwnershipType { | ||
Container = "container", | ||
@@ -164,332 +297,120 @@ Full = "full", | ||
} | ||
export interface Arrays extends Element<XmlArray> { | ||
type: AliasType[]; | ||
array?: Arrays[]; | ||
export interface TransferOwnership { | ||
"transfer-ownership": TransferOwnershipType; | ||
} | ||
export interface XmlArray { | ||
length?: string; | ||
"zero-terminated"?: string; | ||
"c:type": string; | ||
export interface ConstructorElement { | ||
$: InfoAttrs & CallableAttrs; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface FunctionReturnValueMeta { | ||
"transfer-ownership"?: TransferOwnership; | ||
nullable?: string; | ||
} | ||
export interface InterfaceElement extends Element<Class> { | ||
doc?: DocElement[]; | ||
"source-position"?: SourcePositionElement[]; | ||
prerequisite?: CIncludeElement[]; | ||
"virtual-method"?: VirtualMethod[]; | ||
method: Method[]; | ||
property?: InterfaceProperty[]; | ||
"glib:signal"?: InterfaceGLibSignal[]; | ||
function?: Function[]; | ||
callback?: Callback[]; | ||
} | ||
export interface ClassElement extends Element<Class> { | ||
doc?: DocElement[]; | ||
"source-position"?: SourcePositionElement[]; | ||
implements?: CIncludeElement[]; | ||
"constructor"?: ClassConstructor[]; | ||
"virtual-method"?: VirtualMethod[]; | ||
method?: Method[]; | ||
property?: ClassProperty[]; | ||
field?: ClassField[]; | ||
"glib:signal"?: ClassGLibSignalElement[]; | ||
function?: Function[]; | ||
callback?: Callback[]; | ||
} | ||
export interface Class { | ||
export interface CallableAttrs { | ||
name: string; | ||
"c:symbol-prefix": string; | ||
"c:type"?: string; | ||
parent?: string; | ||
"glib:type-name": string; | ||
"glib:get-type": string; | ||
"glib:type-struct"?: string; | ||
abstract?: string; | ||
version?: Version; | ||
} | ||
export interface ClassConstructor extends Element<FunctionMeta> { | ||
doc?: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: ParameterContainer<ClassConstructorParameter>; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface FunctionMeta { | ||
name: string; | ||
"c:identifier"?: string; | ||
version?: Version; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
"shadowed-by"?: string; | ||
shadows?: string; | ||
throws?: string; | ||
"moved-to"?: string; | ||
invoker?: string; | ||
throws?: BinaryOption | BinaryOption; | ||
"moved-to"?: string[]; | ||
} | ||
export interface DocDeprecatedElement extends Element<DocDeprecated> { | ||
_: string; | ||
export interface VarArgs { | ||
$: InfoAttrs; | ||
} | ||
export interface DocDeprecated { | ||
"xml:space": XMLSpace; | ||
export interface CallableParamElement extends DocElement, AnyType { | ||
$: InfoAttrs & Partial<TransferOwnership> & { | ||
name?: string; | ||
nullable?: BinaryOption | BinaryOption; | ||
"allow-none"?: BinaryOption | BinaryOption; | ||
introspectable?: BinaryOption | BinaryOption; | ||
closure?: UnparsedNumber; | ||
destroy?: UnparsedNumber; | ||
scope?: "notified" | "async" | "call"; | ||
direction?: Direction; | ||
"caller-allocates"?: BinaryOption | BinaryOption; | ||
optional?: BinaryOption | BinaryOption; | ||
skip?: BinaryOption | BinaryOption; | ||
}; | ||
varargs?: VarArgs[]; | ||
} | ||
export interface ClassConstructorParameter extends ClassMethodParameter { | ||
doc?: DocElement[]; | ||
type?: ParameterType[]; | ||
varargs?: string[]; | ||
array?: Arrays[]; | ||
export interface CallableParams { | ||
parameter: CallableParamElement[]; | ||
"instance-parameter"?: AnyType & { | ||
$: Partial<{ | ||
name: string; | ||
nullable?: BinaryOption | BinaryOption; | ||
"allow-none"?: BinaryOption | BinaryOption; | ||
direction?: Direction; | ||
"caller-allocates"?: BinaryOption | BinaryOption; | ||
}> & Partial<TransferOwnership>; | ||
}[]; | ||
} | ||
export interface ConstructorMeta { | ||
name: string; | ||
"transfer-ownership": TransferOwnership; | ||
nullable?: string; | ||
"allow-none"?: string; | ||
export interface CallableReturn extends AnyType, DocElement { | ||
$: { | ||
introspectable?: BinaryOption | BinaryOption; | ||
nullable?: BinaryOption | BinaryOption; | ||
closure?: UnparsedNumber; | ||
scope?: "notified" | "async" | "call"; | ||
destroy?: UnparsedNumber; | ||
skip?: BinaryOption | BinaryOption; | ||
"allow-none"?: BinaryOption | BinaryOption; | ||
} & Partial<TransferOwnership>; | ||
} | ||
export interface ParameterType extends Element<Alias> { | ||
type?: CIncludeElement[]; | ||
export interface FunctionElement extends DocElement { | ||
$: InfoAttrs & CallableAttrs; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface ClassField extends Element<FieldMeta> { | ||
type?: ClassFieldType[]; | ||
doc?: DocElement[]; | ||
array?: ClassFieldArray[]; | ||
export interface MethodElement extends DocElement { | ||
$: InfoAttrs & CallableAttrs; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface ClassFieldArray { | ||
$: ClassFieldArrayMeta; | ||
type: AliasType[]; | ||
export interface VirtualMethodElement extends DocElement { | ||
$: InfoAttrs & CallableAttrs & { | ||
invoker?: string; | ||
}; | ||
parameters?: [CallableParams]; | ||
"return-value"?: CallableReturn[]; | ||
} | ||
export interface ClassFieldArrayMeta { | ||
"zero-terminated"?: string; | ||
"fixed-size"?: string; | ||
name?: string; | ||
"c:type"?: string; | ||
length?: string; | ||
export interface UnionElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name?: string; | ||
"c:type"?: string; | ||
"c:symbol-prefix"?: string; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
}; | ||
field?: FieldElement[]; | ||
"constructor"?: ConstructorElement[]; | ||
method?: MethodElement[]; | ||
function?: FunctionElement[]; | ||
record?: RecordElement[]; | ||
} | ||
export interface ClassFieldType { | ||
$: Alias; | ||
type?: AliasType[]; | ||
} | ||
export interface FunctionReturnValue { | ||
$?: FunctionReturnValueMeta; | ||
doc?: DocElement[]; | ||
type?: ParameterType[]; | ||
array?: FunctionReturnValueArray[]; | ||
} | ||
export interface FunctionReturnValueArray { | ||
$: FunctionReturnValueMeta; | ||
type: AliasType[]; | ||
} | ||
export interface FunctionReturnValueMeta { | ||
"c:type": string; | ||
length?: string; | ||
"zero-terminated"?: string; | ||
name?: string; | ||
} | ||
export interface ClassGLibSignalElement extends Element<ClassGLibSignal> { | ||
$: ClassGLibSignal; | ||
doc?: DocElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: MethodParameterContainer[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface ClassGLibSignal { | ||
name: string; | ||
when?: When; | ||
version?: Version; | ||
detailed?: string; | ||
"no-recurse"?: string; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
action?: string; | ||
"no-hooks"?: string; | ||
} | ||
export declare enum When { | ||
Cleanup = "cleanup", | ||
First = "first", | ||
Last = "last" | ||
} | ||
export interface MethodParameterContainer { | ||
"instance-parameter": ClassMethodInstanceParameter[]; | ||
parameter?: ClassMethodParameter[]; | ||
} | ||
export interface ClassMethodInstanceParameter extends Element<ConstructorMeta> { | ||
doc?: DocElement[]; | ||
type: AliasType[]; | ||
} | ||
export interface ClassMethodParameter extends Element<Parameter> { | ||
doc?: DocElement[]; | ||
type?: ParameterType[]; | ||
array?: Arrays[]; | ||
varargs?: string[]; | ||
} | ||
export interface ReturnValue { | ||
$?: FunctionReturnValueMeta; | ||
type?: ParameterType[]; | ||
doc?: DocElement[]; | ||
array?: Arrays[]; | ||
} | ||
export interface ClassProperty extends Element<Property> { | ||
doc?: DocElement[]; | ||
array?: PropertyArray[]; | ||
type?: ParameterType[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface Property { | ||
name: string; | ||
version?: Version; | ||
writable?: binary; | ||
"transfer-ownership"?: TransferOwnership; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
construct?: string; | ||
"construct-only"?: string; | ||
readable?: string; | ||
} | ||
export interface PropertyArray { | ||
type: CIncludeElement[]; | ||
} | ||
export interface VirtualMethod extends Method { | ||
"source-position": SourcePositionElement[]; | ||
"return-value": FunctionReturnValue[]; | ||
parameters: MethodParameterContainer[]; | ||
doc?: DocElement[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface ConstantElement extends Element<Constant> { | ||
doc?: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
type: AliasType[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface Enumeration extends Element<Bitfield> { | ||
doc?: DocElement[]; | ||
export interface BitfieldElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"c:type": string; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
}; | ||
member: MemberElement[]; | ||
function?: Function[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
function: FunctionElement[]; | ||
} | ||
export interface Function extends Element<FunctionMeta> { | ||
doc?: DocElement[]; | ||
"source-position"?: SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: ParameterContainer<ClassMethodParameter>; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
export interface EnumElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
"c:type": string; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
"glib:error-domain"?: string; | ||
}; | ||
member?: MemberElement[]; | ||
function?: FunctionElement[]; | ||
} | ||
export interface InterfaceGLibSignal extends Element<InterfaceGLibSignalMeta> { | ||
doc: DocElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: ParameterContainer<ClassMethodParameter>; | ||
export interface MemberElement extends InfoElements { | ||
$: InfoAttrs & { | ||
name: string; | ||
value: string; | ||
"c:identifier": string; | ||
"glib:nick"?: string; | ||
}; | ||
} | ||
export interface InterfaceGLibSignalMeta { | ||
name: string; | ||
when?: When; | ||
version?: Version; | ||
introspectable?: string; | ||
"c:identifier"?: string; | ||
} | ||
export interface InterfaceProperty extends Element<Property> { | ||
type: AliasType[]; | ||
doc?: DocElement[]; | ||
} | ||
export interface RecordElement extends Element<Record> { | ||
"source-position": SourcePositionElement[]; | ||
field?: RecordField[]; | ||
doc?: DocElement[]; | ||
union?: Union[]; | ||
function?: RecordFunction[]; | ||
method?: Method[]; | ||
"constructor"?: RecordConstructor[]; | ||
} | ||
export interface Record { | ||
foreign: binary; | ||
name: string; | ||
"c:type": string; | ||
"glib:is-gtype-struct-for"?: string; | ||
disguised?: string; | ||
deprecated?: string; | ||
"deprecated-version"?: Version; | ||
version?: Version; | ||
"glib:type-name"?: string; | ||
"glib:get-type"?: string; | ||
"c:symbol-prefix"?: string; | ||
} | ||
export interface RecordConstructor extends Element<FunctionMeta> { | ||
doc: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
parameters?: ParameterContainer<RecordConstructorParameter>; | ||
} | ||
export interface RecordConstructorParameter extends Element<ConstructorMeta> { | ||
doc: DocElement[]; | ||
type?: AliasType[]; | ||
array?: Arrays[]; | ||
varargs?: string[]; | ||
} | ||
export interface RecordField extends Element<FieldMeta> { | ||
type?: ClassFieldType[]; | ||
callback?: FieldCallback[]; | ||
doc?: DocElement[]; | ||
array?: ClassFieldArray[]; | ||
} | ||
export interface FieldMeta { | ||
name: string; | ||
writable?: string; | ||
bits?: string; | ||
readable?: string; | ||
private?: string; | ||
} | ||
export interface FieldCallback { | ||
$: FieldCallbackMeta; | ||
"source-position": SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: ParameterContainer<CallbackParameter>; | ||
} | ||
export interface FieldCallbackMeta { | ||
name: string; | ||
introspectable?: string; | ||
throws?: string; | ||
} | ||
export interface RecordFunction extends Element<InterfaceGLibSignalMeta> { | ||
doc: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters?: ParameterContainer<RecordFunctionParameter>; | ||
} | ||
export interface RecordFunctionParameter extends Element<ConstructorMeta> { | ||
doc: DocElement[]; | ||
type?: ParameterType[]; | ||
varargs?: string[]; | ||
array?: StickyArrayElement[]; | ||
} | ||
export interface StickyArrayElement extends Element<StickyArray> { | ||
type: AliasType[]; | ||
} | ||
export interface StickyArray { | ||
"zero-terminated": string; | ||
"c:type": string; | ||
} | ||
export interface Method extends Element<FunctionMeta> { | ||
doc?: DocElement[]; | ||
"source-position": SourcePositionElement[]; | ||
"return-value": ReturnValue[]; | ||
parameters: MethodParameterContainer[]; | ||
"doc-deprecated"?: DocDeprecatedElement[]; | ||
} | ||
export interface Union { | ||
$?: Alias; | ||
"source-position": SourcePositionElement[]; | ||
field: UnionField[]; | ||
} | ||
export interface UnionField extends Element<FieldMeta> { | ||
type?: AliasType[]; | ||
array?: UnionArrayElement[]; | ||
} | ||
export interface UnionArrayElement extends Element<UnionArray> { | ||
type: AliasType[]; | ||
} | ||
export interface UnionArray { | ||
"zero-terminated": string; | ||
"fixed-size": string; | ||
} | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.When = exports.TransferOwnership = exports.Scope = exports.Direction = exports.XMLSpace = void 0; | ||
var XMLSpace; | ||
(function (XMLSpace) { | ||
XMLSpace["Preserve"] = "preserve"; | ||
})(XMLSpace = exports.XMLSpace || (exports.XMLSpace = {})); | ||
exports.TransferOwnershipType = exports.Direction = void 0; | ||
var Direction; | ||
@@ -14,19 +10,7 @@ (function (Direction) { | ||
})(Direction = exports.Direction || (exports.Direction = {})); | ||
var Scope; | ||
(function (Scope) { | ||
Scope["Async"] = "async"; | ||
Scope["Call"] = "call"; | ||
Scope["Notified"] = "notified"; | ||
})(Scope = exports.Scope || (exports.Scope = {})); | ||
var TransferOwnership; | ||
(function (TransferOwnership) { | ||
TransferOwnership["Container"] = "container"; | ||
TransferOwnership["Full"] = "full"; | ||
TransferOwnership["None"] = "none"; | ||
})(TransferOwnership = exports.TransferOwnership || (exports.TransferOwnership = {})); | ||
var When; | ||
(function (When) { | ||
When["Cleanup"] = "cleanup"; | ||
When["First"] = "first"; | ||
When["Last"] = "last"; | ||
})(When = exports.When || (exports.When = {})); | ||
var TransferOwnershipType; | ||
(function (TransferOwnershipType) { | ||
TransferOwnershipType["Container"] = "container"; | ||
TransferOwnershipType["Full"] = "full"; | ||
TransferOwnershipType["None"] = "none"; | ||
})(TransferOwnershipType = exports.TransferOwnershipType || (exports.TransferOwnershipType = {})); |
{ | ||
"name": "@gi.ts/parser", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"main": "dist/lib.js", | ||
@@ -29,3 +29,3 @@ "types": "dist/lib.d.ts", | ||
}, | ||
"gitHead": "a94a1cd0c94d8c42b284a57fe2a6c712dd2caace" | ||
"gitHead": "db567857bb7e2675d07b8ef8d95541b5000a7e0a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30190
10
1005
1