@ts-for-gir/lib
Version:
Typescript .d.ts generator from GIR for gjs
46 lines (45 loc) • 1.5 kB
TypeScript
import type { GirInfoAttrs, TsDoc } from '../types/index.js';
/**
* Split a package name into namespace and version
*/
export declare const splitModuleName: (packageName: string) => {
packageName: string;
namespace: string;
version: string;
};
/** Remove namespace prefix */
export declare const removeNamespace: (type: string, namespace: string) => string;
/** Remove class module name prefix */
export declare const removeClassModule: (type: string, namespace: string) => string;
/**
* Add namespace prefix
*/
export declare const addNamespace: (type: string, namespace: string) => string;
/**
* Check if a line is a comment line
* @param line The line to check
* @returns Whether the line is a comment line or not
*/
export declare const isCommentLine: (line: string) => boolean;
/**
* Convert a GirBoolean to a boolean
* @param boolStr The GirBoolean string
* @param defaultVal The default value
* @returns The boolean value
*/
export declare const girBool: (boolStr: string | undefined, defaultVal?: boolean) => boolean;
export declare const printGirDocComment: (tsDoc: TsDoc, config: {
noComments: boolean;
}) => string;
export declare const isIntrospectable: (e: {
$?: GirInfoAttrs;
}) => boolean;
export declare const isDeprecated: (e: {
$: GirInfoAttrs;
}) => boolean;
export declare const deprecatedVersion: (e: {
$: GirInfoAttrs;
}) => string | undefined;
export declare const introducedVersion: (e: {
$: GirInfoAttrs;
}) => string | undefined;