UNPKG

nitro-codegen

Version:

The code-generator for react-native-nitro-modules.

27 lines (26 loc) 1.09 kB
import type { Language } from '../../getPlatformSpecs.js'; import { type SourceFile, type SourceImport } from '../SourceFile.js'; import type { NamedType, Type, TypeKind } from './Type.js'; export declare class FunctionType implements Type { readonly returnType: Type; readonly parameters: NamedType[]; constructor(returnType: Type, parameters: NamedType[], isSync?: boolean); get specializationName(): string; get jsName(): string; get canBePassedByReference(): boolean; get kind(): TypeKind; /** * For a function, get the forward recreation of it: * If variable is called `func`, this would return: * ```cpp * [func = std::move(func)](Params... params) -> ReturnType { * return func(params...); * } * ``` */ getForwardRecreationCode(variableName: string, language: Language): string; getCppFunctionPointerType(name: string, includeNameInfo?: boolean): string; getCode(language: Language, includeNameInfo?: boolean): string; getExtraFiles(): SourceFile[]; getRequiredImports(): SourceImport[]; }