UNPKG

nitro-codegen

Version:

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

20 lines (18 loc) 485 B
type DeclarationKind = 'class' | 'struct' | 'enum class' export function getForwardDeclaration( kind: DeclarationKind, className: string, namespace?: string ): string { if (namespace != null) { return ` // Forward declaration of \`${className}\` to properly resolve imports. namespace ${namespace} { ${kind} ${className}; } `.trim() } else { return ` // Forward declaration of \`${className}\` to properly resolve imports. ${kind} ${className}; `.trim() } }