mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Indent C++ method declarations
Summary: This moves the `indent` function into a `Utils` module so it can be also used to properly indent the abstract methods declarations in a C++ TurboModule spec. Changelog: Internal Reviewed By: nlutsenko Differential Revision: D34704456 fbshipit-source-id: 88a3a672e4860927b5dd1f5107f40da7b5a83e51
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3b61f2108d
commit
269fa37bb8
@@ -19,6 +19,7 @@ import type {
|
||||
|
||||
import type {AliasResolver} from './Utils';
|
||||
const {createAliasResolver, getModules} = require('./Utils');
|
||||
const {indent} = require('../Utils');
|
||||
const {unwrapNullable} = require('../../parsers/flow/modules/utils');
|
||||
|
||||
type FilesOutput = Map<string, string>;
|
||||
@@ -32,7 +33,7 @@ protected:
|
||||
${hasteModuleName}CxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
||||
|
||||
public:
|
||||
${moduleProperties}
|
||||
${indent(moduleProperties, 2)}
|
||||
|
||||
};`;
|
||||
};
|
||||
@@ -57,6 +58,7 @@ const FileTemplate = ({
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
${modules}
|
||||
|
||||
} // namespace react
|
||||
|
||||
Reference in New Issue
Block a user